PageRenderTime 63ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/external/strace/linux/syscall.h

https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk
C Header | 370 lines | 288 code | 30 blank | 52 comment | 15 complexity | df1c1a8616c00c48435f9c51b4f32144 MD5 | raw file
  1. /*
  2. * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  3. * Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. * 1. Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. * 3. The name of the author may not be used to endorse or promote products
  15. * derived from this software without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  18. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  19. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  20. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  21. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  22. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  23. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  24. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  26. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. *
  28. * $Id$
  29. */
  30. #include "dummy.h"
  31. /* primary syscalls */
  32. int sys_restart_syscall();
  33. int sys_setup(), sys_exit(), sys_fork(), sys_read(), sys_write();
  34. int sys_open(), sys_close(), sys_waitpid(), sys_creat(), sys_link();
  35. int sys_unlink(), sys_execve(), sys_chdir(), sys_time(), sys_mknod();
  36. int sys_chmod(), sys_chown(), sys_break(), sys_oldstat();
  37. int sys_lseek(), sys_getpid(), sys_mount(), sys_umount(), sys_umount2();
  38. int sys_setuid(), sys_getuid(), sys_stime(), sys_ptrace();
  39. int sys_alarm(), sys_oldfstat(), sys_pause(), sys_utime();
  40. int sys_stty(), sys_gtty(), sys_access(), sys_nice(), sys_ftime();
  41. int sys_sync(), sys_kill(), sys_rename(), sys_mkdir(), sys_rmdir();
  42. int sys_dup(), sys_pipe(), sys_times(), sys_prof(), sys_brk();
  43. int sys_setgid(), sys_getgid(), sys_signal(), sys_geteuid();
  44. int sys_getegid(), sys_acct(), sys_phys(), sys_lock(), sys_ioctl();
  45. int sys_fcntl(), sys_mpx(), sys_setpgid(), sys_ulimit();
  46. int sys_olduname(), sys_umask(), sys_chroot(), sys_ustat();
  47. int sys_dup2(), sys_getppid(), sys_getpgrp(), sys_setsid();
  48. int sys_sigaction(), sys_siggetmask(), sys_sigsetmask();
  49. int sys_setreuid(), sys_setregid(), sys_sigsuspend();
  50. int sys_sigpending(), sys_sethostname(), sys_setrlimit();
  51. int sys_getrlimit(), sys_getrusage(), sys_gettimeofday();
  52. int sys_settimeofday(), sys_getgroups(), sys_setgroups();
  53. int sys_setgroups32(), sys_getgroups32();
  54. int sys_oldselect(), sys_symlink(), sys_oldlstat(), sys_readlink();
  55. int sys_uselib(), sys_swapon(), sys_reboot(), sys_readdir();
  56. int sys_mmap(), sys_munmap(), sys_truncate(), sys_ftruncate();
  57. int sys_fchmod(), sys_fchown(), sys_getpriority();
  58. int sys_setpriority(), sys_profil(), sys_statfs(), sys_fstatfs();
  59. int sys_ioperm(), sys_socketcall(), sys_syslog(), sys_setitimer();
  60. int sys_getitimer(), sys_stat(), sys_lstat(), sys_fstat();
  61. int sys_uname(), sys_iopl(), sys_vhangup(), sys_idle(), sys_vm86();
  62. int sys_wait4(), sys_swapoff(), sys_ipc(), sys_sigreturn();
  63. int sys_fsync(), sys_clone(), sys_setdomainname(), sys_sysinfo();
  64. int sys_modify_ldt(), sys_adjtimex(), sys_mprotect();
  65. int sys_sigprocmask(), sys_create_module(), sys_init_module();
  66. int sys_delete_module(), sys_get_kernel_syms(), sys_quotactl();
  67. int sys_getpgid(), sys_fchdir(), sys_bdflush();
  68. int sys_sysfs(), sys_personality(), sys_afs_syscall();
  69. int sys_setfsuid(), sys_setfsgid(), sys_llseek();
  70. int sys_getdents(), sys_flock(), sys_msync();
  71. int sys_readv(), sys_writev(), sys_select();
  72. int sys_getsid(), sys_fdatasync(), sys_sysctl();
  73. int sys_mlock(), sys_munlock(), sys_mlockall(), sys_munlockall(), sys_madvise();
  74. int sys_sched_setparam(), sys_sched_getparam();
  75. int sys_sched_setscheduler(), sys_sched_getscheduler(), sys_sched_yield();
  76. int sys_sched_get_priority_max(), sys_sched_get_priority_min();
  77. int sys_sched_rr_get_interval(), sys_nanosleep(), sys_mremap();
  78. int sys_sendmsg(), sys_recvmsg(), sys_setresuid(), sys_setresgid();
  79. int sys_getresuid(), sys_getresgid(), sys_pread(), sys_pwrite(), sys_getcwd();
  80. int sys_sigaltstack(), sys_rt_sigprocmask(), sys_rt_sigaction();
  81. int sys_rt_sigpending(), sys_rt_sigsuspend(), sys_rt_sigqueueinfo();
  82. int sys_rt_sigtimedwait(), sys_prctl(), sys_poll(), sys_vfork();
  83. int sys_sendfile(), sys_old_mmap(), sys_stat64(), sys_lstat64(), sys_fstat64();
  84. int sys_truncate64(), sys_ftruncate64(), sys_pivotroot();
  85. int sys_getdents64();
  86. int sys_getpmsg(), sys_putpmsg(), sys_readahead(), sys_sendfile64();
  87. int sys_setxattr(), sys_fsetxattr(), sys_getxattr(), sys_fgetxattr();
  88. int sys_listxattr(), sys_flistxattr(), sys_removexattr(), sys_fremovexattr();
  89. int sys_sched_setaffinity(), sys_sched_getaffinity(), sys_futex();
  90. int sys_set_thread_area(), sys_get_thread_area(), sys_remap_file_pages();
  91. int sys_timer_create(), sys_timer_delete(), sys_timer_getoverrun();
  92. int sys_timer_gettime(), sys_timer_settime(), sys_clock_settime();
  93. int sys_clock_gettime(), sys_clock_getres(), sys_clock_nanosleep();
  94. int sys_semtimedop(), sys_statfs64(), sys_fstatfs64(), sys_tgkill();
  95. int sys_mq_open(), sys_mq_timedsend(), sys_mq_timedreceive();
  96. int sys_mq_notify(), sys_mq_getsetattr();
  97. int sys_epoll_create(), sys_epoll_ctl(), sys_epoll_wait();
  98. int sys_waitid(), sys_fadvise64(), sys_fadvise64_64();
  99. int sys_mbind(), sys_get_mempolicy(), sys_set_mempolicy(), sys_move_pages();
  100. int sys_arch_prctl();
  101. int sys_io_setup(), sys_io_submit(), sys_io_cancel(), sys_io_getevents(), sys_io_destroy();
  102. int sys_utimensat(), sys_epoll_pwait(), sys_signalfd(), sys_timerfd(), sys_eventfd();
  103. int sys_getcpu();
  104. int sys_fallocate(), sys_timerfd_create(), sys_timerfd_settime(), sys_timerfd_gettime();
  105. int sys_signalfd4(), sys_eventfd2(), sys_epoll_create1(), sys_dup3(), sys_pipe2();
  106. /* sys_socketcall subcalls */
  107. int sys_socket(), sys_bind(), sys_connect(), sys_listen(), sys_accept4();
  108. int sys_accept(), sys_getsockname(), sys_getpeername(), sys_socketpair();
  109. int sys_send(), sys_recv(), sys_sendto(), sys_recvfrom();
  110. int sys_shutdown(), sys_setsockopt(), sys_getsockopt();
  111. int sys_recvmmsg();
  112. /* *at syscalls */
  113. int sys_fchmodat();
  114. int sys_newfstatat();
  115. int sys_unlinkat();
  116. int sys_fchownat();
  117. int sys_openat();
  118. int sys_renameat();
  119. int sys_symlinkat();
  120. int sys_readlinkat();
  121. int sys_linkat();
  122. int sys_faccessat();
  123. int sys_mkdirat();
  124. int sys_mknodat();
  125. int sys_futimesat();
  126. /* new ones */
  127. int sys_query_module();
  128. int sys_poll();
  129. int sys_mincore();
  130. int sys_inotify_add_watch();
  131. int sys_inotify_rm_watch();
  132. int sys_inotify_init1();
  133. int sys_pselect6();
  134. int sys_ppoll();
  135. int sys_unshare();
  136. /* architecture-specific calls */
  137. #ifdef ALPHA
  138. int sys_osf_select();
  139. int sys_osf_gettimeofday();
  140. int sys_osf_settimeofday();
  141. int sys_osf_getitimer();
  142. int sys_osf_setitimer();
  143. int sys_osf_getrusage();
  144. int sys_osf_wait4();
  145. int sys_osf_utimes();
  146. #endif
  147. #ifndef SYS_waitid
  148. # ifdef I386
  149. # define SYS_waitid 284
  150. # elif defined ALPHA
  151. # define SYS_waitid 438
  152. # elif defined ARM
  153. # define SYS_waitid (NR_SYSCALL_BASE + 280)
  154. # elif defined IA64
  155. # define SYS_waitid 1270
  156. # elif defined M68K
  157. # define SYS_waitid 277
  158. # elif defined POWERPC
  159. # define SYS_waitid 272
  160. # elif defined S390 || defined S390X
  161. # define SYS_waitid 281
  162. # elif defined SH64
  163. # define SYS_waitid 312
  164. # elif defined SH64
  165. # define SYS_waitid 312
  166. # elif defined SH
  167. # define SYS_waitid 284
  168. # elif defined SPARC || defined SPARC64
  169. # define SYS_waitid 279
  170. # elif defined X86_64
  171. # define SYS_waitid 247
  172. # endif
  173. #endif
  174. #if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
  175. !defined(__ARM_EABI__)
  176. # ifdef IA64
  177. /*
  178. * IA64 syscall numbers (the only ones available from standard header
  179. * files) are disjoint from IA32 syscall numbers. We need to define
  180. * the IA32 socket call number here.
  181. */
  182. # define SYS_socketcall 102
  183. # undef SYS_socket
  184. # undef SYS_bind
  185. # undef SYS_connect
  186. # undef SYS_listen
  187. # undef SYS_accept
  188. # undef SYS_getsockname
  189. # undef SYS_getpeername
  190. # undef SYS_socketpair
  191. # undef SYS_send
  192. # undef SYS_recv
  193. # undef SYS_sendto
  194. # undef SYS_recvfrom
  195. # undef SYS_shutdown
  196. # undef SYS_setsockopt
  197. # undef SYS_getsockopt
  198. # undef SYS_sendmsg
  199. # undef SYS_recvmsg
  200. # endif /* IA64 */
  201. # if defined(SPARC) || defined(SPARC64)
  202. # define SYS_socket_subcall 353
  203. # else
  204. # define SYS_socket_subcall 400
  205. # endif
  206. #define SYS_sub_socket (SYS_socket_subcall + 1)
  207. #define SYS_sub_bind (SYS_socket_subcall + 2)
  208. #define SYS_sub_connect (SYS_socket_subcall + 3)
  209. #define SYS_sub_listen (SYS_socket_subcall + 4)
  210. #define SYS_sub_accept (SYS_socket_subcall + 5)
  211. #define SYS_sub_getsockname (SYS_socket_subcall + 6)
  212. #define SYS_sub_getpeername (SYS_socket_subcall + 7)
  213. #define SYS_sub_socketpair (SYS_socket_subcall + 8)
  214. #define SYS_sub_send (SYS_socket_subcall + 9)
  215. #define SYS_sub_recv (SYS_socket_subcall + 10)
  216. #define SYS_sub_sendto (SYS_socket_subcall + 11)
  217. #define SYS_sub_recvfrom (SYS_socket_subcall + 12)
  218. #define SYS_sub_shutdown (SYS_socket_subcall + 13)
  219. #define SYS_sub_setsockopt (SYS_socket_subcall + 14)
  220. #define SYS_sub_getsockopt (SYS_socket_subcall + 15)
  221. #define SYS_sub_sendmsg (SYS_socket_subcall + 16)
  222. #define SYS_sub_recvmsg (SYS_socket_subcall + 17)
  223. #define SYS_sub_accept4 (SYS_socket_subcall + 18)
  224. #define SYS_sub_recvmmsg (SYS_socket_subcall + 19)
  225. #define SYS_socket_nsubcalls 20
  226. #endif /* !(ALPHA || MIPS || HPPA) */
  227. /* sys_ipc subcalls */
  228. int sys_semget(), sys_semctl(), sys_semop();
  229. int sys_msgsnd(), sys_msgrcv(), sys_msgget(), sys_msgctl();
  230. int sys_shmat(), sys_shmdt(), sys_shmget(), sys_shmctl();
  231. #if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
  232. !defined(__ARM_EABI__)
  233. # ifdef IA64
  234. /*
  235. * IA64 syscall numbers (the only ones available from standard
  236. * header files) are disjoint from IA32 syscall numbers. We need
  237. * to define the IA32 socket call number here. Fortunately, this
  238. * symbol, `SYS_ipc', is not used by any of the IA64 code so
  239. * re-defining this symbol will not cause a problem.
  240. */
  241. # undef SYS_ipc
  242. # define SYS_ipc 117
  243. # undef SYS_semop
  244. # undef SYS_semget
  245. # undef SYS_semctl
  246. # undef SYS_semtimedop
  247. # undef SYS_msgsnd
  248. # undef SYS_msgrcv
  249. # undef SYS_msgget
  250. # undef SYS_msgctl
  251. # undef SYS_shmat
  252. # undef SYS_shmdt
  253. # undef SYS_shmget
  254. # undef SYS_shmctl
  255. # endif /* IA64 */
  256. #define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
  257. #define SYS_sub_semop (SYS_ipc_subcall + 1)
  258. #define SYS_sub_semget (SYS_ipc_subcall + 2)
  259. #define SYS_sub_semctl (SYS_ipc_subcall + 3)
  260. #define SYS_sub_semtimedop (SYS_ipc_subcall + 4)
  261. #define SYS_sub_msgsnd (SYS_ipc_subcall + 11)
  262. #define SYS_sub_msgrcv (SYS_ipc_subcall + 12)
  263. #define SYS_sub_msgget (SYS_ipc_subcall + 13)
  264. #define SYS_sub_msgctl (SYS_ipc_subcall + 14)
  265. #define SYS_sub_shmat (SYS_ipc_subcall + 21)
  266. #define SYS_sub_shmdt (SYS_ipc_subcall + 22)
  267. #define SYS_sub_shmget (SYS_ipc_subcall + 23)
  268. #define SYS_sub_shmctl (SYS_ipc_subcall + 24)
  269. #define SYS_ipc_nsubcalls 25
  270. #endif /* !(ALPHA || MIPS || HPPA) */
  271. #if defined SYS_ipc_subcall && !defined SYS_ipc
  272. # define SYS_ipc SYS_ipc_subcall
  273. #endif
  274. #if defined SYS_socket_subcall && !defined SYS_socketcall
  275. # define SYS_socketcall SYS_socket_subcall
  276. #endif
  277. #ifdef IA64
  278. /*
  279. * IA64 syscall numbers (the only ones available from standard header
  280. * files) are disjoint from IA32 syscall numbers. We need to define
  281. * some IA32 specific syscalls here.
  282. */
  283. # define SYS_fork 2
  284. # define SYS_vfork 190
  285. # define SYS32_exit 1
  286. # define SYS_waitpid 7
  287. # define SYS32_wait4 114
  288. # define SYS32_execve 11
  289. #endif /* IA64 */
  290. #if defined(ALPHA) || defined(IA64)
  291. int sys_getpagesize();
  292. #endif
  293. #ifdef ALPHA
  294. int osf_statfs(), osf_fstatfs();
  295. #endif
  296. #ifdef IA64
  297. int sys_getpmsg(), sys_putpmsg(); /* STREAMS stuff */
  298. #endif
  299. #ifdef MIPS
  300. int sys_sysmips();
  301. #endif
  302. int sys_setpgrp(), sys_gethostname(), sys_getdtablesize(), sys_utimes();
  303. int sys_capget(), sys_capset();
  304. #if defined M68K || defined SH
  305. int sys_cacheflush();
  306. #endif
  307. int sys_pread64(), sys_pwrite64();
  308. #ifdef POWERPC
  309. int sys_subpage_prot();
  310. #endif
  311. #ifdef BFIN
  312. int sys_sram_alloc();
  313. int sys_cacheflush();
  314. #endif
  315. #if defined SPARC || defined SPARC64
  316. #include "sparc/syscall1.h"
  317. int sys_execv();
  318. int sys_getpagesize();
  319. int sys_getmsg(), sys_putmsg();
  320. int sys_semsys(), sys_semctl(), sys_semget();
  321. #define SYS_semsys_subcall 200
  322. #define SYS_semsys_nsubcalls 3
  323. #define SYS_semctl (SYS_semsys_subcall + 0)
  324. #define SYS_semget (SYS_semsys_subcall + 1)
  325. #define SYS_semop (SYS_semsys_subcall + 2)
  326. int sys_msgsys(), sys_msgget(), sys_msgctl(), sys_msgrcv(), sys_msgsnd();
  327. #define SYS_msgsys_subcall 203
  328. #define SYS_msgsys_nsubcalls 4
  329. #define SYS_msgget (SYS_msgsys_subcall + 0)
  330. #define SYS_msgctl (SYS_msgsys_subcall + 1)
  331. #define SYS_msgrcv (SYS_msgsys_subcall + 2)
  332. #define SYS_msgsnd (SYS_msgsys_subcall + 3)
  333. int sys_shmsys(), sys_shmat(), sys_shmctl(), sys_shmdt(), sys_shmget();
  334. #define SYS_shmsys_subcall 207
  335. #define SYS_shmsys_nsubcalls 4
  336. #define SYS_shmat (SYS_shmsys_subcall + 0)
  337. #define SYS_shmctl (SYS_shmsys_subcall + 1)
  338. #define SYS_shmdt (SYS_shmsys_subcall + 2)
  339. #define SYS_shmget (SYS_shmsys_subcall + 3)
  340. #endif