ADFA-LD+Syscall+List.txt 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. #if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL)
  2. #define _ASM_GENERIC_UNISTD_H
  3. #include <asm/bitsperlong.h>
  4. /*
  5. * This file contains the system call numbers, based on the
  6. * layout of the x86-64 architecture, which embeds the
  7. * pointer to the syscall in the table.
  8. *
  9. * As a basic principle, no duplication of functionality
  10. * should be added, e.g. we don't use lseek when llseek
  11. * is present. New architectures should use this file
  12. * and implement the less feature-full calls in user space.
  13. */
  14. #ifndef __SYSCALL
  15. #define __SYSCALL(x, y)
  16. #endif
  17. #if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)
  18. #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32)
  19. #else
  20. #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64)
  21. #endif
  22. #define __NR_io_setup 0
  23. __SYSCALL(__NR_io_setup, sys_io_setup)
  24. #define __NR_io_destroy 1
  25. __SYSCALL(__NR_io_destroy, sys_io_destroy)
  26. #define __NR_io_submit 2
  27. __SYSCALL(__NR_io_submit, sys_io_submit)
  28. #define __NR_io_cancel 3
  29. __SYSCALL(__NR_io_cancel, sys_io_cancel)
  30. #define __NR_io_getevents 4
  31. __SYSCALL(__NR_io_getevents, sys_io_getevents)
  32. /* fs/xattr.c */
  33. #define __NR_setxattr 5
  34. __SYSCALL(__NR_setxattr, sys_setxattr)
  35. #define __NR_lsetxattr 6
  36. __SYSCALL(__NR_lsetxattr, sys_lsetxattr)
  37. #define __NR_fsetxattr 7
  38. __SYSCALL(__NR_fsetxattr, sys_fsetxattr)
  39. #define __NR_getxattr 8
  40. __SYSCALL(__NR_getxattr, sys_getxattr)
  41. #define __NR_lgetxattr 9
  42. __SYSCALL(__NR_lgetxattr, sys_lgetxattr)
  43. #define __NR_fgetxattr 10
  44. __SYSCALL(__NR_fgetxattr, sys_fgetxattr)
  45. #define __NR_listxattr 11
  46. __SYSCALL(__NR_listxattr, sys_listxattr)
  47. #define __NR_llistxattr 12
  48. __SYSCALL(__NR_llistxattr, sys_llistxattr)
  49. #define __NR_flistxattr 13
  50. __SYSCALL(__NR_flistxattr, sys_flistxattr)
  51. #define __NR_removexattr 14
  52. __SYSCALL(__NR_removexattr, sys_removexattr)
  53. #define __NR_lremovexattr 15
  54. __SYSCALL(__NR_lremovexattr, sys_lremovexattr)
  55. #define __NR_fremovexattr 16
  56. __SYSCALL(__NR_fremovexattr, sys_fremovexattr)
  57. /* fs/dcache.c */
  58. #define __NR_getcwd 17
  59. __SYSCALL(__NR_getcwd, sys_getcwd)
  60. /* fs/cookies.c */
  61. #define __NR_lookup_dcookie 18
  62. __SYSCALL(__NR_lookup_dcookie, sys_lookup_dcookie)
  63. /* fs/eventfd.c */
  64. #define __NR_eventfd2 19
  65. __SYSCALL(__NR_eventfd2, sys_eventfd2)
  66. /* fs/eventpoll.c */
  67. #define __NR_epoll_create1 20
  68. __SYSCALL(__NR_epoll_create1, sys_epoll_create1)
  69. #define __NR_epoll_ctl 21
  70. __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl)
  71. #define __NR_epoll_pwait 22
  72. __SYSCALL(__NR_epoll_pwait, sys_epoll_pwait)
  73. /* fs/fcntl.c */
  74. #define __NR_dup 23
  75. __SYSCALL(__NR_dup, sys_dup)
  76. #define __NR_dup3 24
  77. __SYSCALL(__NR_dup3, sys_dup3)
  78. #define __NR3264_fcntl 25
  79. __SC_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl)
  80. /* fs/inotify_user.c */
  81. #define __NR_inotify_init1 26
  82. __SYSCALL(__NR_inotify_init1, sys_inotify_init1)
  83. #define __NR_inotify_add_watch 27
  84. __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch)
  85. #define __NR_inotify_rm_watch 28
  86. __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
  87. /* fs/ioctl.c */
  88. #define __NR_ioctl 29
  89. __SYSCALL(__NR_ioctl, sys_ioctl)
  90. /* fs/ioprio.c */
  91. #define __NR_ioprio_set 30
  92. __SYSCALL(__NR_ioprio_set, sys_ioprio_set)
  93. #define __NR_ioprio_get 31
  94. __SYSCALL(__NR_ioprio_get, sys_ioprio_get)
  95. /* fs/locks.c */
  96. #define __NR_flock 32
  97. __SYSCALL(__NR_flock, sys_flock)
  98. /* fs/namei.c */
  99. #define __NR_mknodat 33
  100. __SYSCALL(__NR_mknodat, sys_mknodat)
  101. #define __NR_mkdirat 34
  102. __SYSCALL(__NR_mkdirat, sys_mkdirat)
  103. #define __NR_unlinkat 35
  104. __SYSCALL(__NR_unlinkat, sys_unlinkat)
  105. #define __NR_symlinkat 36
  106. __SYSCALL(__NR_symlinkat, sys_symlinkat)
  107. #define __NR_linkat 37
  108. __SYSCALL(__NR_linkat, sys_linkat)
  109. #define __NR_renameat 38
  110. __SYSCALL(__NR_renameat, sys_renameat)
  111. /* fs/namespace.c */
  112. #define __NR_umount2 39
  113. __SYSCALL(__NR_umount2, sys_umount)
  114. #define __NR_mount 40
  115. __SYSCALL(__NR_mount, sys_mount)
  116. #define __NR_pivot_root 41
  117. __SYSCALL(__NR_pivot_root, sys_pivot_root)
  118. /* fs/nfsctl.c */
  119. #define __NR_nfsservctl 42
  120. __SYSCALL(__NR_nfsservctl, sys_nfsservctl)
  121. /* fs/open.c */
  122. #define __NR3264_statfs 43
  123. __SC_3264(__NR3264_statfs, sys_statfs64, sys_statfs)
  124. #define __NR3264_fstatfs 44
  125. __SC_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs)
  126. #define __NR3264_truncate 45
  127. __SC_3264(__NR3264_truncate, sys_truncate64, sys_truncate)
  128. #define __NR3264_ftruncate 46
  129. __SC_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate)
  130. #define __NR_fallocate 47
  131. __SYSCALL(__NR_fallocate, sys_fallocate)
  132. #define __NR_faccessat 48
  133. __SYSCALL(__NR_faccessat, sys_faccessat)
  134. #define __NR_chdir 49
  135. __SYSCALL(__NR_chdir, sys_chdir)
  136. #define __NR_fchdir 50
  137. __SYSCALL(__NR_fchdir, sys_fchdir)
  138. #define __NR_chroot 51
  139. __SYSCALL(__NR_chroot, sys_chroot)
  140. #define __NR_fchmod 52
  141. __SYSCALL(__NR_fchmod, sys_fchmod)
  142. #define __NR_fchmodat 53
  143. __SYSCALL(__NR_fchmodat, sys_fchmodat)
  144. #define __NR_fchownat 54
  145. __SYSCALL(__NR_fchownat, sys_fchownat)
  146. #define __NR_fchown 55
  147. __SYSCALL(__NR_fchown, sys_fchown)
  148. #define __NR_openat 56
  149. __SYSCALL(__NR_openat, sys_openat)
  150. #define __NR_close 57
  151. __SYSCALL(__NR_close, sys_close)
  152. #define __NR_vhangup 58
  153. __SYSCALL(__NR_vhangup, sys_vhangup)
  154. /* fs/pipe.c */
  155. #define __NR_pipe2 59
  156. __SYSCALL(__NR_pipe2, sys_pipe2)
  157. /* fs/quota.c */
  158. #define __NR_quotactl 60
  159. __SYSCALL(__NR_quotactl, sys_quotactl)
  160. /* fs/readdir.c */
  161. #define __NR_getdents64 61
  162. __SYSCALL(__NR_getdents64, sys_getdents64)
  163. /* fs/read_write.c */
  164. #define __NR3264_lseek 62
  165. __SC_3264(__NR3264_lseek, sys_llseek, sys_lseek)
  166. #define __NR_read 63
  167. __SYSCALL(__NR_read, sys_read)
  168. #define __NR_write 64
  169. __SYSCALL(__NR_write, sys_write)
  170. #define __NR_readv 65
  171. __SYSCALL(__NR_readv, sys_readv)
  172. #define __NR_writev 66
  173. __SYSCALL(__NR_writev, sys_writev)
  174. #define __NR_pread64 67
  175. __SYSCALL(__NR_pread64, sys_pread64)
  176. #define __NR_pwrite64 68
  177. __SYSCALL(__NR_pwrite64, sys_pwrite64)
  178. #define __NR_preadv 69
  179. __SYSCALL(__NR_preadv, sys_preadv)
  180. #define __NR_pwritev 70
  181. __SYSCALL(__NR_pwritev, sys_pwritev)
  182. /* fs/sendfile.c */
  183. #define __NR3264_sendfile 71
  184. __SC_3264(__NR3264_sendfile, sys_sendfile64, sys_sendfile)
  185. /* fs/select.c */
  186. #define __NR_pselect6 72
  187. __SYSCALL(__NR_pselect6, sys_pselect6)
  188. #define __NR_ppoll 73
  189. __SYSCALL(__NR_ppoll, sys_ppoll)
  190. /* fs/signalfd.c */
  191. #define __NR_signalfd4 74
  192. __SYSCALL(__NR_signalfd4, sys_signalfd4)
  193. /* fs/splice.c */
  194. #define __NR_vmsplice 75
  195. __SYSCALL(__NR_vmsplice, sys_vmsplice)
  196. #define __NR_splice 76
  197. __SYSCALL(__NR_splice, sys_splice)
  198. #define __NR_tee 77
  199. __SYSCALL(__NR_tee, sys_tee)
  200. /* fs/stat.c */
  201. #define __NR_readlinkat 78
  202. __SYSCALL(__NR_readlinkat, sys_readlinkat)
  203. #define __NR3264_fstatat 79
  204. __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat)
  205. #define __NR3264_fstat 80
  206. __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat)
  207. /* fs/sync.c */
  208. #define __NR_sync 81
  209. __SYSCALL(__NR_sync, sys_sync)
  210. #define __NR_fsync 82
  211. __SYSCALL(__NR_fsync, sys_fsync)
  212. #define __NR_fdatasync 83
  213. __SYSCALL(__NR_fdatasync, sys_fdatasync)
  214. #ifdef __ARCH_WANT_SYNC_FILE_RANGE2
  215. #define __NR_sync_file_range2 84
  216. __SYSCALL(__NR_sync_file_range2, sys_sync_file_range2)
  217. #else
  218. #define __NR_sync_file_range 84
  219. __SYSCALL(__NR_sync_file_range, sys_sync_file_range)
  220. #endif
  221. /* fs/timerfd.c */
  222. #define __NR_timerfd_create 85
  223. __SYSCALL(__NR_timerfd_create, sys_timerfd_create)
  224. #define __NR_timerfd_settime 86
  225. __SYSCALL(__NR_timerfd_settime, sys_timerfd_settime)
  226. #define __NR_timerfd_gettime 87
  227. __SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime)
  228. /* fs/utimes.c */
  229. #define __NR_utimensat 88
  230. __SYSCALL(__NR_utimensat, sys_utimensat)
  231. /* kernel/acct.c */
  232. #define __NR_acct 89
  233. __SYSCALL(__NR_acct, sys_acct)
  234. /* kernel/capability.c */
  235. #define __NR_capget 90
  236. __SYSCALL(__NR_capget, sys_capget)
  237. #define __NR_capset 91
  238. __SYSCALL(__NR_capset, sys_capset)
  239. /* kernel/exec_domain.c */
  240. #define __NR_personality 92
  241. __SYSCALL(__NR_personality, sys_personality)
  242. /* kernel/exit.c */
  243. #define __NR_exit 93
  244. __SYSCALL(__NR_exit, sys_exit)
  245. #define __NR_exit_group 94
  246. __SYSCALL(__NR_exit_group, sys_exit_group)
  247. #define __NR_waitid 95
  248. __SYSCALL(__NR_waitid, sys_waitid)
  249. /* kernel/fork.c */
  250. #define __NR_set_tid_address 96
  251. __SYSCALL(__NR_set_tid_address, sys_set_tid_address)
  252. #define __NR_unshare 97
  253. __SYSCALL(__NR_unshare, sys_unshare)
  254. /* kernel/futex.c */
  255. #define __NR_futex 98
  256. __SYSCALL(__NR_futex, sys_futex)
  257. #define __NR_set_robust_list 99
  258. __SYSCALL(__NR_set_robust_list, sys_set_robust_list)
  259. #define __NR_get_robust_list 100
  260. __SYSCALL(__NR_get_robust_list, sys_get_robust_list)
  261. /* kernel/hrtimer.c */
  262. #define __NR_nanosleep 101
  263. __SYSCALL(__NR_nanosleep, sys_nanosleep)
  264. /* kernel/itimer.c */
  265. #define __NR_getitimer 102
  266. __SYSCALL(__NR_getitimer, sys_getitimer)
  267. #define __NR_setitimer 103
  268. __SYSCALL(__NR_setitimer, sys_setitimer)
  269. /* kernel/kexec.c */
  270. #define __NR_kexec_load 104
  271. __SYSCALL(__NR_kexec_load, sys_kexec_load)
  272. /* kernel/module.c */
  273. #define __NR_init_module 105
  274. __SYSCALL(__NR_init_module, sys_init_module)
  275. #define __NR_delete_module 106
  276. __SYSCALL(__NR_delete_module, sys_delete_module)
  277. /* kernel/posix-timers.c */
  278. #define __NR_timer_create 107
  279. __SYSCALL(__NR_timer_create, sys_timer_create)
  280. #define __NR_timer_gettime 108
  281. __SYSCALL(__NR_timer_gettime, sys_timer_gettime)
  282. #define __NR_timer_getoverrun 109
  283. __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun)
  284. #define __NR_timer_settime 110
  285. __SYSCALL(__NR_timer_settime, sys_timer_settime)
  286. #define __NR_timer_delete 111
  287. __SYSCALL(__NR_timer_delete, sys_timer_delete)
  288. #define __NR_clock_settime 112
  289. __SYSCALL(__NR_clock_settime, sys_clock_settime)
  290. #define __NR_clock_gettime 113
  291. __SYSCALL(__NR_clock_gettime, sys_clock_gettime)
  292. #define __NR_clock_getres 114
  293. __SYSCALL(__NR_clock_getres, sys_clock_getres)
  294. #define __NR_clock_nanosleep 115
  295. __SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep)
  296. /* kernel/printk.c */
  297. #define __NR_syslog 116
  298. __SYSCALL(__NR_syslog, sys_syslog)
  299. /* kernel/ptrace.c */
  300. #define __NR_ptrace 117
  301. __SYSCALL(__NR_ptrace, sys_ptrace)
  302. /* kernel/sched.c */
  303. #define __NR_sched_setparam 118
  304. __SYSCALL(__NR_sched_setparam, sys_sched_setparam)
  305. #define __NR_sched_setscheduler 119
  306. __SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler)
  307. #define __NR_sched_getscheduler 120
  308. __SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
  309. #define __NR_sched_getparam 121
  310. __SYSCALL(__NR_sched_getparam, sys_sched_getparam)
  311. #define __NR_sched_setaffinity 122
  312. __SYSCALL(__NR_sched_setaffinity, sys_sched_setaffinity)
  313. #define __NR_sched_getaffinity 123
  314. __SYSCALL(__NR_sched_getaffinity, sys_sched_getaffinity)
  315. #define __NR_sched_yield 124
  316. __SYSCALL(__NR_sched_yield, sys_sched_yield)
  317. #define __NR_sched_get_priority_max 125
  318. __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
  319. #define __NR_sched_get_priority_min 126
  320. __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
  321. #define __NR_sched_rr_get_interval 127
  322. __SYSCALL(__NR_sched_rr_get_interval, sys_sched_rr_get_interval)
  323. /* kernel/signal.c */
  324. #define __NR_restart_syscall 128
  325. __SYSCALL(__NR_restart_syscall, sys_restart_syscall)
  326. #define __NR_kill 129
  327. __SYSCALL(__NR_kill, sys_kill)
  328. #define __NR_tkill 130
  329. __SYSCALL(__NR_tkill, sys_tkill)
  330. #define __NR_tgkill 131
  331. __SYSCALL(__NR_tgkill, sys_tgkill)
  332. #define __NR_sigaltstack 132
  333. __SYSCALL(__NR_sigaltstack, sys_sigaltstack)
  334. #define __NR_rt_sigsuspend 133
  335. __SYSCALL(__NR_rt_sigsuspend, sys_rt_sigsuspend) /* __ARCH_WANT_SYS_RT_SIGSUSPEND */
  336. #define __NR_rt_sigaction 134
  337. __SYSCALL(__NR_rt_sigaction, sys_rt_sigaction) /* __ARCH_WANT_SYS_RT_SIGACTION */
  338. #define __NR_rt_sigprocmask 135
  339. __SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask)
  340. #define __NR_rt_sigpending 136
  341. __SYSCALL(__NR_rt_sigpending, sys_rt_sigpending)
  342. #define __NR_rt_sigtimedwait 137
  343. __SYSCALL(__NR_rt_sigtimedwait, sys_rt_sigtimedwait)
  344. #define __NR_rt_sigqueueinfo 138
  345. __SYSCALL(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo)
  346. #define __NR_rt_sigreturn 139
  347. __SYSCALL(__NR_rt_sigreturn, sys_rt_sigreturn) /* sys_rt_sigreturn_wrapper, */
  348. /* kernel/sys.c */
  349. #define __NR_setpriority 140
  350. __SYSCALL(__NR_setpriority, sys_setpriority)
  351. #define __NR_getpriority 141
  352. __SYSCALL(__NR_getpriority, sys_getpriority)
  353. #define __NR_reboot 142
  354. __SYSCALL(__NR_reboot, sys_reboot)
  355. #define __NR_setregid 143
  356. __SYSCALL(__NR_setregid, sys_setregid)
  357. #define __NR_setgid 144
  358. __SYSCALL(__NR_setgid, sys_setgid)
  359. #define __NR_setreuid 145
  360. __SYSCALL(__NR_setreuid, sys_setreuid)
  361. #define __NR_setuid 146
  362. __SYSCALL(__NR_setuid, sys_setuid)
  363. #define __NR_setresuid 147
  364. __SYSCALL(__NR_setresuid, sys_setresuid)
  365. #define __NR_getresuid 148
  366. __SYSCALL(__NR_getresuid, sys_getresuid)
  367. #define __NR_setresgid 149
  368. __SYSCALL(__NR_setresgid, sys_setresgid)
  369. #define __NR_getresgid 150
  370. __SYSCALL(__NR_getresgid, sys_getresgid)
  371. #define __NR_setfsuid 151
  372. __SYSCALL(__NR_setfsuid, sys_setfsuid)
  373. #define __NR_setfsgid 152
  374. __SYSCALL(__NR_setfsgid, sys_setfsgid)
  375. #define __NR_times 153
  376. __SYSCALL(__NR_times, sys_times)
  377. #define __NR_setpgid 154
  378. __SYSCALL(__NR_setpgid, sys_setpgid)
  379. #define __NR_getpgid 155
  380. __SYSCALL(__NR_getpgid, sys_getpgid)
  381. #define __NR_getsid 156
  382. __SYSCALL(__NR_getsid, sys_getsid)
  383. #define __NR_setsid 157
  384. __SYSCALL(__NR_setsid, sys_setsid)
  385. #define __NR_getgroups 158
  386. __SYSCALL(__NR_getgroups, sys_getgroups)
  387. #define __NR_setgroups 159
  388. __SYSCALL(__NR_setgroups, sys_setgroups)
  389. #define __NR_uname 160
  390. __SYSCALL(__NR_uname, sys_newuname)
  391. #define __NR_sethostname 161
  392. __SYSCALL(__NR_sethostname, sys_sethostname)
  393. #define __NR_setdomainname 162
  394. __SYSCALL(__NR_setdomainname, sys_setdomainname)
  395. #define __NR_getrlimit 163
  396. __SYSCALL(__NR_getrlimit, sys_getrlimit)
  397. #define __NR_setrlimit 164
  398. __SYSCALL(__NR_setrlimit, sys_setrlimit)
  399. #define __NR_getrusage 165
  400. __SYSCALL(__NR_getrusage, sys_getrusage)
  401. #define __NR_umask 166
  402. __SYSCALL(__NR_umask, sys_umask)
  403. #define __NR_prctl 167
  404. __SYSCALL(__NR_prctl, sys_prctl)
  405. #define __NR_getcpu 168
  406. __SYSCALL(__NR_getcpu, sys_getcpu)
  407. /* kernel/time.c */
  408. #define __NR_gettimeofday 169
  409. __SYSCALL(__NR_gettimeofday, sys_gettimeofday)
  410. #define __NR_settimeofday 170
  411. __SYSCALL(__NR_settimeofday, sys_settimeofday)
  412. #define __NR_adjtimex 171
  413. __SYSCALL(__NR_adjtimex, sys_adjtimex)
  414. /* kernel/timer.c */
  415. #define __NR_getpid 172
  416. __SYSCALL(__NR_getpid, sys_getpid)
  417. #define __NR_getppid 173
  418. __SYSCALL(__NR_getppid, sys_getppid)
  419. #define __NR_getuid 174
  420. __SYSCALL(__NR_getuid, sys_getuid)
  421. #define __NR_geteuid 175
  422. __SYSCALL(__NR_geteuid, sys_geteuid)
  423. #define __NR_getgid 176
  424. __SYSCALL(__NR_getgid, sys_getgid)
  425. #define __NR_getegid 177
  426. __SYSCALL(__NR_getegid, sys_getegid)
  427. #define __NR_gettid 178
  428. __SYSCALL(__NR_gettid, sys_gettid)
  429. #define __NR_sysinfo 179
  430. __SYSCALL(__NR_sysinfo, sys_sysinfo)
  431. /* ipc/mqueue.c */
  432. #define __NR_mq_open 180
  433. __SYSCALL(__NR_mq_open, sys_mq_open)
  434. #define __NR_mq_unlink 181
  435. __SYSCALL(__NR_mq_unlink, sys_mq_unlink)
  436. #define __NR_mq_timedsend 182
  437. __SYSCALL(__NR_mq_timedsend, sys_mq_timedsend)
  438. #define __NR_mq_timedreceive 183
  439. __SYSCALL(__NR_mq_timedreceive, sys_mq_timedreceive)
  440. #define __NR_mq_notify 184
  441. __SYSCALL(__NR_mq_notify, sys_mq_notify)
  442. #define __NR_mq_getsetattr 185
  443. __SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr)
  444. /* ipc/msg.c */
  445. #define __NR_msgget 186
  446. __SYSCALL(__NR_msgget, sys_msgget)
  447. #define __NR_msgctl 187
  448. __SYSCALL(__NR_msgctl, sys_msgctl)
  449. #define __NR_msgrcv 188
  450. __SYSCALL(__NR_msgrcv, sys_msgrcv)
  451. #define __NR_msgsnd 189
  452. __SYSCALL(__NR_msgsnd, sys_msgsnd)
  453. /* ipc/sem.c */
  454. #define __NR_semget 190
  455. __SYSCALL(__NR_semget, sys_semget)
  456. #define __NR_semctl 191
  457. __SYSCALL(__NR_semctl, sys_semctl)
  458. #define __NR_semtimedop 192
  459. __SYSCALL(__NR_semtimedop, sys_semtimedop)
  460. #define __NR_semop 193
  461. __SYSCALL(__NR_semop, sys_semop)
  462. /* ipc/shm.c */
  463. #define __NR_shmget 194
  464. __SYSCALL(__NR_shmget, sys_shmget)
  465. #define __NR_shmctl 195
  466. __SYSCALL(__NR_shmctl, sys_shmctl)
  467. #define __NR_shmat 196
  468. __SYSCALL(__NR_shmat, sys_shmat)
  469. #define __NR_shmdt 197
  470. __SYSCALL(__NR_shmdt, sys_shmdt)
  471. /* net/socket.c */
  472. #define __NR_socket 198
  473. __SYSCALL(__NR_socket, sys_socket)
  474. #define __NR_socketpair 199
  475. __SYSCALL(__NR_socketpair, sys_socketpair)
  476. #define __NR_bind 200
  477. __SYSCALL(__NR_bind, sys_bind)
  478. #define __NR_listen 201
  479. __SYSCALL(__NR_listen, sys_listen)
  480. #define __NR_accept 202
  481. __SYSCALL(__NR_accept, sys_accept)
  482. #define __NR_connect 203
  483. __SYSCALL(__NR_connect, sys_connect)
  484. #define __NR_getsockname 204
  485. __SYSCALL(__NR_getsockname, sys_getsockname)
  486. #define __NR_getpeername 205
  487. __SYSCALL(__NR_getpeername, sys_getpeername)
  488. #define __NR_sendto 206
  489. __SYSCALL(__NR_sendto, sys_sendto)
  490. #define __NR_recvfrom 207
  491. __SYSCALL(__NR_recvfrom, sys_recvfrom)
  492. #define __NR_setsockopt 208
  493. __SYSCALL(__NR_setsockopt, sys_setsockopt)
  494. #define __NR_getsockopt 209
  495. __SYSCALL(__NR_getsockopt, sys_getsockopt)
  496. #define __NR_shutdown 210
  497. __SYSCALL(__NR_shutdown, sys_shutdown)
  498. #define __NR_sendmsg 211
  499. __SYSCALL(__NR_sendmsg, sys_sendmsg)
  500. #define __NR_recvmsg 212
  501. __SYSCALL(__NR_recvmsg, sys_recvmsg)
  502. /* mm/filemap.c */
  503. #define __NR_readahead 213
  504. __SYSCALL(__NR_readahead, sys_readahead)
  505. /* mm/nommu.c, also with MMU */
  506. #define __NR_brk 214
  507. __SYSCALL(__NR_brk, sys_brk)
  508. #define __NR_munmap 215
  509. __SYSCALL(__NR_munmap, sys_munmap)
  510. #define __NR_mremap 216
  511. __SYSCALL(__NR_mremap, sys_mremap)
  512. /* security/keys/keyctl.c */
  513. #define __NR_add_key 217
  514. __SYSCALL(__NR_add_key, sys_add_key)
  515. #define __NR_request_key 218
  516. __SYSCALL(__NR_request_key, sys_request_key)
  517. #define __NR_keyctl 219
  518. __SYSCALL(__NR_keyctl, sys_keyctl)
  519. /* arch/example/kernel/sys_example.c */
  520. #define __NR_clone 220
  521. __SYSCALL(__NR_clone, sys_clone) /* .long sys_clone_wrapper */
  522. #define __NR_execve 221
  523. __SYSCALL(__NR_execve, sys_execve) /* .long sys_execve_wrapper */
  524. #define __NR3264_mmap 222
  525. __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
  526. /* mm/fadvise.c */
  527. #define __NR3264_fadvise64 223
  528. __SYSCALL(__NR3264_fadvise64, sys_fadvise64_64)
  529. /* mm/, CONFIG_MMU only */
  530. #ifndef __ARCH_NOMMU
  531. #define __NR_swapon 224
  532. __SYSCALL(__NR_swapon, sys_swapon)
  533. #define __NR_swapoff 225
  534. __SYSCALL(__NR_swapoff, sys_swapoff)
  535. #define __NR_mprotect 226
  536. __SYSCALL(__NR_mprotect, sys_mprotect)
  537. #define __NR_msync 227
  538. __SYSCALL(__NR_msync, sys_msync)
  539. #define __NR_mlock 228
  540. __SYSCALL(__NR_mlock, sys_mlock)
  541. #define __NR_munlock 229
  542. __SYSCALL(__NR_munlock, sys_munlock)
  543. #define __NR_mlockall 230
  544. __SYSCALL(__NR_mlockall, sys_mlockall)
  545. #define __NR_munlockall 231
  546. __SYSCALL(__NR_munlockall, sys_munlockall)
  547. #define __NR_mincore 232
  548. __SYSCALL(__NR_mincore, sys_mincore)
  549. #define __NR_madvise 233
  550. __SYSCALL(__NR_madvise, sys_madvise)
  551. #define __NR_remap_file_pages 234
  552. __SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
  553. #define __NR_mbind 235
  554. __SYSCALL(__NR_mbind, sys_mbind)
  555. #define __NR_get_mempolicy 236
  556. __SYSCALL(__NR_get_mempolicy, sys_get_mempolicy)
  557. #define __NR_set_mempolicy 237
  558. __SYSCALL(__NR_set_mempolicy, sys_set_mempolicy)
  559. #define __NR_migrate_pages 238
  560. __SYSCALL(__NR_migrate_pages, sys_migrate_pages)
  561. #define __NR_move_pages 239
  562. __SYSCALL(__NR_move_pages, sys_move_pages)
  563. #endif
  564. #define __NR_rt_tgsigqueueinfo 240
  565. __SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo)
  566. #define __NR_perf_event_open 241
  567. __SYSCALL(__NR_perf_event_open, sys_perf_event_open)
  568. #define __NR_accept4 242
  569. __SYSCALL(__NR_accept4, sys_accept4)
  570. #define __NR_recvmmsg 243
  571. __SYSCALL(__NR_recvmmsg, sys_recvmmsg)
  572. /*
  573. * Architectures may provide up to 16 syscalls of their own
  574. * starting with this value.
  575. */
  576. #define __NR_arch_specific_syscall 244
  577. #define __NR_wait4 260
  578. __SYSCALL(__NR_wait4, sys_wait4)
  579. #define __NR_prlimit64 261
  580. __SYSCALL(__NR_prlimit64, sys_prlimit64)
  581. #define __NR_fanotify_init 262
  582. __SYSCALL(__NR_fanotify_init, sys_fanotify_init)
  583. #define __NR_fanotify_mark 263
  584. __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)
  585. #undef __NR_syscalls
  586. #define __NR_syscalls 264
  587. /*
  588. * All syscalls below here should go away really,
  589. * these are provided for both review and as a porting
  590. * help for the C library version.
  591. *
  592. * Last chance: are any of these important enough to
  593. * enable by default?
  594. */
  595. #ifdef __ARCH_WANT_SYSCALL_NO_AT
  596. #define __NR_open 1024
  597. __SYSCALL(__NR_open, sys_open)
  598. #define __NR_link 1025
  599. __SYSCALL(__NR_link, sys_link)
  600. #define __NR_unlink 1026
  601. __SYSCALL(__NR_unlink, sys_unlink)
  602. #define __NR_mknod 1027
  603. __SYSCALL(__NR_mknod, sys_mknod)
  604. #define __NR_chmod 1028
  605. __SYSCALL(__NR_chmod, sys_chmod)
  606. #define __NR_chown 1029
  607. __SYSCALL(__NR_chown, sys_chown)
  608. #define __NR_mkdir 1030
  609. __SYSCALL(__NR_mkdir, sys_mkdir)
  610. #define __NR_rmdir 1031
  611. __SYSCALL(__NR_rmdir, sys_rmdir)
  612. #define __NR_lchown 1032
  613. __SYSCALL(__NR_lchown, sys_lchown)
  614. #define __NR_access 1033
  615. __SYSCALL(__NR_access, sys_access)
  616. #define __NR_rename 1034
  617. __SYSCALL(__NR_rename, sys_rename)
  618. #define __NR_readlink 1035
  619. __SYSCALL(__NR_readlink, sys_readlink)
  620. #define __NR_symlink 1036
  621. __SYSCALL(__NR_symlink, sys_symlink)
  622. #define __NR_utimes 1037
  623. __SYSCALL(__NR_utimes, sys_utimes)
  624. #define __NR3264_stat 1038
  625. __SC_3264(__NR3264_stat, sys_stat64, sys_newstat)
  626. #define __NR3264_lstat 1039
  627. __SC_3264(__NR3264_lstat, sys_lstat64, sys_newlstat)
  628. #undef __NR_syscalls
  629. #define __NR_syscalls (__NR3264_lstat+1)
  630. #endif /* __ARCH_WANT_SYSCALL_NO_AT */
  631. #ifdef __ARCH_WANT_SYSCALL_NO_FLAGS
  632. #define __NR_pipe 1040
  633. __SYSCALL(__NR_pipe, sys_pipe)
  634. #define __NR_dup2 1041
  635. __SYSCALL(__NR_dup2, sys_dup2)
  636. #define __NR_epoll_create 1042
  637. __SYSCALL(__NR_epoll_create, sys_epoll_create)
  638. #define __NR_inotify_init 1043
  639. __SYSCALL(__NR_inotify_init, sys_inotify_init)
  640. #define __NR_eventfd 1044
  641. __SYSCALL(__NR_eventfd, sys_eventfd)
  642. #define __NR_signalfd 1045
  643. __SYSCALL(__NR_signalfd, sys_signalfd)
  644. #undef __NR_syscalls
  645. #define __NR_syscalls (__NR_signalfd+1)
  646. #endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */
  647. #if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && \
  648. defined(__ARCH_WANT_SYSCALL_OFF_T)
  649. #define __NR_sendfile 1046
  650. __SYSCALL(__NR_sendfile, sys_sendfile)
  651. #define __NR_ftruncate 1047
  652. __SYSCALL(__NR_ftruncate, sys_ftruncate)
  653. #define __NR_truncate 1048
  654. __SYSCALL(__NR_truncate, sys_truncate)
  655. #define __NR_stat 1049
  656. __SYSCALL(__NR_stat, sys_newstat)
  657. #define __NR_lstat 1050
  658. __SYSCALL(__NR_lstat, sys_newlstat)
  659. #define __NR_fstat 1051
  660. __SYSCALL(__NR_fstat, sys_newfstat)
  661. #define __NR_fcntl 1052
  662. __SYSCALL(__NR_fcntl, sys_fcntl)
  663. #define __NR_fadvise64 1053
  664. #define __ARCH_WANT_SYS_FADVISE64
  665. __SYSCALL(__NR_fadvise64, sys_fadvise64)
  666. #define __NR_newfstatat 1054
  667. #define __ARCH_WANT_SYS_NEWFSTATAT
  668. __SYSCALL(__NR_newfstatat, sys_newfstatat)
  669. #define __NR_fstatfs 1055
  670. __SYSCALL(__NR_fstatfs, sys_fstatfs)
  671. #define __NR_statfs 1056
  672. __SYSCALL(__NR_statfs, sys_statfs)
  673. #define __NR_lseek 1057
  674. __SYSCALL(__NR_lseek, sys_lseek)
  675. #define __NR_mmap 1058
  676. __SYSCALL(__NR_mmap, sys_mmap)
  677. #undef __NR_syscalls
  678. #define __NR_syscalls (__NR_mmap+1)
  679. #endif /* 32 bit off_t syscalls */
  680. #ifdef __ARCH_WANT_SYSCALL_DEPRECATED
  681. #define __NR_alarm 1059
  682. #define __ARCH_WANT_SYS_ALARM
  683. __SYSCALL(__NR_alarm, sys_alarm)
  684. #define __NR_getpgrp 1060
  685. #define __ARCH_WANT_SYS_GETPGRP
  686. __SYSCALL(__NR_getpgrp, sys_getpgrp)
  687. #define __NR_pause 1061
  688. #define __ARCH_WANT_SYS_PAUSE
  689. __SYSCALL(__NR_pause, sys_pause)
  690. #define __NR_time 1062
  691. #define __ARCH_WANT_SYS_TIME
  692. #define __ARCH_WANT_COMPAT_SYS_TIME
  693. __SYSCALL(__NR_time, sys_time)
  694. #define __NR_utime 1063
  695. #define __ARCH_WANT_SYS_UTIME
  696. __SYSCALL(__NR_utime, sys_utime)
  697. #define __NR_creat 1064
  698. __SYSCALL(__NR_creat, sys_creat)
  699. #define __NR_getdents 1065
  700. #define __ARCH_WANT_SYS_GETDENTS
  701. __SYSCALL(__NR_getdents, sys_getdents)
  702. #define __NR_futimesat 1066
  703. __SYSCALL(__NR_futimesat, sys_futimesat)
  704. #define __NR_select 1067
  705. #define __ARCH_WANT_SYS_SELECT
  706. __SYSCALL(__NR_select, sys_select)
  707. #define __NR_poll 1068
  708. __SYSCALL(__NR_poll, sys_poll)
  709. #define __NR_epoll_wait 1069
  710. __SYSCALL(__NR_epoll_wait, sys_epoll_wait)
  711. #define __NR_ustat 1070
  712. __SYSCALL(__NR_ustat, sys_ustat)
  713. #define __NR_vfork 1071
  714. __SYSCALL(__NR_vfork, sys_vfork)
  715. #define __NR_oldwait4 1072
  716. __SYSCALL(__NR_oldwait4, sys_wait4)
  717. #define __NR_recv 1073
  718. __SYSCALL(__NR_recv, sys_recv)
  719. #define __NR_send 1074
  720. __SYSCALL(__NR_send, sys_send)
  721. #define __NR_bdflush 1075
  722. __SYSCALL(__NR_bdflush, sys_bdflush)
  723. #define __NR_umount 1076
  724. __SYSCALL(__NR_umount, sys_oldumount)
  725. #define __ARCH_WANT_SYS_OLDUMOUNT
  726. #define __NR_uselib 1077
  727. __SYSCALL(__NR_uselib, sys_uselib)
  728. #define __NR__sysctl 1078
  729. __SYSCALL(__NR__sysctl, sys_sysctl)
  730. #define __NR_fork 1079
  731. #ifdef CONFIG_MMU
  732. __SYSCALL(__NR_fork, sys_fork)
  733. #else
  734. __SYSCALL(__NR_fork, sys_ni_syscall)
  735. #endif /* CONFIG_MMU */
  736. #undef __NR_syscalls
  737. #define __NR_syscalls (__NR_fork+1)
  738. #endif /* __ARCH_WANT_SYSCALL_DEPRECATED */
  739. /*
  740. * 32 bit systems traditionally used different
  741. * syscalls for off_t and loff_t arguments, while
  742. * 64 bit systems only need the off_t version.
  743. * For new 32 bit platforms, there is no need to
  744. * implement the old 32 bit off_t syscalls, so
  745. * they take different names.
  746. * Here we map the numbers so that both versions
  747. * use the same syscall table layout.
  748. */
  749. #if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT)
  750. #define __NR_fcntl __NR3264_fcntl
  751. #define __NR_statfs __NR3264_statfs
  752. #define __NR_fstatfs __NR3264_fstatfs
  753. #define __NR_truncate __NR3264_truncate
  754. #define __NR_ftruncate __NR3264_ftruncate
  755. #define __NR_lseek __NR3264_lseek
  756. #define __NR_sendfile __NR3264_sendfile
  757. #define __NR_newfstatat __NR3264_fstatat
  758. #define __NR_fstat __NR3264_fstat
  759. #define __NR_mmap __NR3264_mmap
  760. #define __NR_fadvise64 __NR3264_fadvise64
  761. #ifdef __NR3264_stat
  762. #define __NR_stat __NR3264_stat
  763. #define __NR_lstat __NR3264_lstat
  764. #endif
  765. #else
  766. #define __NR_fcntl64 __NR3264_fcntl
  767. #define __NR_statfs64 __NR3264_statfs
  768. #define __NR_fstatfs64 __NR3264_fstatfs
  769. #define __NR_truncate64 __NR3264_truncate
  770. #define __NR_ftruncate64 __NR3264_ftruncate
  771. #define __NR_llseek __NR3264_lseek
  772. #define __NR_sendfile64 __NR3264_sendfile
  773. #define __NR_fstatat64 __NR3264_fstatat
  774. #define __NR_fstat64 __NR3264_fstat
  775. #define __NR_mmap2 __NR3264_mmap
  776. #define __NR_fadvise64_64 __NR3264_fadvise64
  777. #ifdef __NR3264_stat
  778. #define __NR_stat64 __NR3264_stat
  779. #define __NR_lstat64 __NR3264_lstat
  780. #endif
  781. #endif
  782. #ifdef __KERNEL__
  783. /*
  784. * These are required system calls, we should
  785. * invert the logic eventually and let them
  786. * be selected by default.
  787. */
  788. #if __BITS_PER_LONG == 32
  789. #define __ARCH_WANT_STAT64
  790. #define __ARCH_WANT_SYS_LLSEEK
  791. #endif
  792. #define __ARCH_WANT_SYS_RT_SIGACTION
  793. #define __ARCH_WANT_SYS_RT_SIGSUSPEND
  794. #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
  795. /*
  796. * "Conditional" syscalls
  797. *
  798. * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  799. * but it doesn't work on all toolchains, so we just do it by hand
  800. */
  801. #ifndef cond_syscall
  802. #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
  803. #endif
  804. #endif /* __KERNEL__ */
  805. #endif /* _ASM_GENERIC_UNISTD_H */