unistd.h 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #include <asm/bitsperlong.h>
  3. /*
  4. * This file contains the system call numbers, based on the
  5. * layout of the x86-64 architecture, which embeds the
  6. * pointer to the syscall in the table.
  7. *
  8. * As a basic principle, no duplication of functionality
  9. * should be added, e.g. we don't use lseek when llseek
  10. * is present. New architectures should use this file
  11. * and implement the less feature-full calls in user space.
  12. */
  13. #ifndef __SYSCALL
  14. #define __SYSCALL(x, y)
  15. #endif
  16. #if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)
  17. #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32)
  18. #else
  19. #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64)
  20. #endif
  21. #ifdef __SYSCALL_COMPAT
  22. #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp)
  23. #define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp)
  24. #else
  25. #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
  26. #define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64)
  27. #endif
  28. #define __NR_io_setup 0
  29. __SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup)
  30. #define __NR_io_destroy 1
  31. __SYSCALL(__NR_io_destroy, sys_io_destroy)
  32. #define __NR_io_submit 2
  33. __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit)
  34. #define __NR_io_cancel 3
  35. __SYSCALL(__NR_io_cancel, sys_io_cancel)
  36. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  37. #define __NR_io_getevents 4
  38. __SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents)
  39. #endif
  40. /* fs/xattr.c */
  41. #define __NR_setxattr 5
  42. __SYSCALL(__NR_setxattr, sys_setxattr)
  43. #define __NR_lsetxattr 6
  44. __SYSCALL(__NR_lsetxattr, sys_lsetxattr)
  45. #define __NR_fsetxattr 7
  46. __SYSCALL(__NR_fsetxattr, sys_fsetxattr)
  47. #define __NR_getxattr 8
  48. __SYSCALL(__NR_getxattr, sys_getxattr)
  49. #define __NR_lgetxattr 9
  50. __SYSCALL(__NR_lgetxattr, sys_lgetxattr)
  51. #define __NR_fgetxattr 10
  52. __SYSCALL(__NR_fgetxattr, sys_fgetxattr)
  53. #define __NR_listxattr 11
  54. __SYSCALL(__NR_listxattr, sys_listxattr)
  55. #define __NR_llistxattr 12
  56. __SYSCALL(__NR_llistxattr, sys_llistxattr)
  57. #define __NR_flistxattr 13
  58. __SYSCALL(__NR_flistxattr, sys_flistxattr)
  59. #define __NR_removexattr 14
  60. __SYSCALL(__NR_removexattr, sys_removexattr)
  61. #define __NR_lremovexattr 15
  62. __SYSCALL(__NR_lremovexattr, sys_lremovexattr)
  63. #define __NR_fremovexattr 16
  64. __SYSCALL(__NR_fremovexattr, sys_fremovexattr)
  65. /* fs/dcache.c */
  66. #define __NR_getcwd 17
  67. __SYSCALL(__NR_getcwd, sys_getcwd)
  68. /* fs/cookies.c */
  69. #define __NR_lookup_dcookie 18
  70. __SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie)
  71. /* fs/eventfd.c */
  72. #define __NR_eventfd2 19
  73. __SYSCALL(__NR_eventfd2, sys_eventfd2)
  74. /* fs/eventpoll.c */
  75. #define __NR_epoll_create1 20
  76. __SYSCALL(__NR_epoll_create1, sys_epoll_create1)
  77. #define __NR_epoll_ctl 21
  78. __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl)
  79. #define __NR_epoll_pwait 22
  80. __SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait)
  81. /* fs/fcntl.c */
  82. #define __NR_dup 23
  83. __SYSCALL(__NR_dup, sys_dup)
  84. #define __NR_dup3 24
  85. __SYSCALL(__NR_dup3, sys_dup3)
  86. #define __NR3264_fcntl 25
  87. __SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64)
  88. /* fs/inotify_user.c */
  89. #define __NR_inotify_init1 26
  90. __SYSCALL(__NR_inotify_init1, sys_inotify_init1)
  91. #define __NR_inotify_add_watch 27
  92. __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch)
  93. #define __NR_inotify_rm_watch 28
  94. __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
  95. /* fs/ioctl.c */
  96. #define __NR_ioctl 29
  97. __SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl)
  98. /* fs/ioprio.c */
  99. #define __NR_ioprio_set 30
  100. __SYSCALL(__NR_ioprio_set, sys_ioprio_set)
  101. #define __NR_ioprio_get 31
  102. __SYSCALL(__NR_ioprio_get, sys_ioprio_get)
  103. /* fs/locks.c */
  104. #define __NR_flock 32
  105. __SYSCALL(__NR_flock, sys_flock)
  106. /* fs/namei.c */
  107. #define __NR_mknodat 33
  108. __SYSCALL(__NR_mknodat, sys_mknodat)
  109. #define __NR_mkdirat 34
  110. __SYSCALL(__NR_mkdirat, sys_mkdirat)
  111. #define __NR_unlinkat 35
  112. __SYSCALL(__NR_unlinkat, sys_unlinkat)
  113. #define __NR_symlinkat 36
  114. __SYSCALL(__NR_symlinkat, sys_symlinkat)
  115. #define __NR_linkat 37
  116. __SYSCALL(__NR_linkat, sys_linkat)
  117. #ifdef __ARCH_WANT_RENAMEAT
  118. /* renameat is superseded with flags by renameat2 */
  119. #define __NR_renameat 38
  120. __SYSCALL(__NR_renameat, sys_renameat)
  121. #endif /* __ARCH_WANT_RENAMEAT */
  122. /* fs/namespace.c */
  123. #define __NR_umount2 39
  124. __SYSCALL(__NR_umount2, sys_umount)
  125. #define __NR_mount 40
  126. __SC_COMP(__NR_mount, sys_mount, compat_sys_mount)
  127. #define __NR_pivot_root 41
  128. __SYSCALL(__NR_pivot_root, sys_pivot_root)
  129. /* fs/nfsctl.c */
  130. #define __NR_nfsservctl 42
  131. __SYSCALL(__NR_nfsservctl, sys_ni_syscall)
  132. /* fs/open.c */
  133. #define __NR3264_statfs 43
  134. __SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \
  135. compat_sys_statfs64)
  136. #define __NR3264_fstatfs 44
  137. __SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \
  138. compat_sys_fstatfs64)
  139. #define __NR3264_truncate 45
  140. __SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \
  141. compat_sys_truncate64)
  142. #define __NR3264_ftruncate 46
  143. __SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \
  144. compat_sys_ftruncate64)
  145. #define __NR_fallocate 47
  146. __SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate)
  147. #define __NR_faccessat 48
  148. __SYSCALL(__NR_faccessat, sys_faccessat)
  149. #define __NR_chdir 49
  150. __SYSCALL(__NR_chdir, sys_chdir)
  151. #define __NR_fchdir 50
  152. __SYSCALL(__NR_fchdir, sys_fchdir)
  153. #define __NR_chroot 51
  154. __SYSCALL(__NR_chroot, sys_chroot)
  155. #define __NR_fchmod 52
  156. __SYSCALL(__NR_fchmod, sys_fchmod)
  157. #define __NR_fchmodat 53
  158. __SYSCALL(__NR_fchmodat, sys_fchmodat)
  159. #define __NR_fchownat 54
  160. __SYSCALL(__NR_fchownat, sys_fchownat)
  161. #define __NR_fchown 55
  162. __SYSCALL(__NR_fchown, sys_fchown)
  163. #define __NR_openat 56
  164. __SYSCALL(__NR_openat, sys_openat)
  165. #define __NR_close 57
  166. __SYSCALL(__NR_close, sys_close)
  167. #define __NR_vhangup 58
  168. __SYSCALL(__NR_vhangup, sys_vhangup)
  169. /* fs/pipe.c */
  170. #define __NR_pipe2 59
  171. __SYSCALL(__NR_pipe2, sys_pipe2)
  172. /* fs/quota.c */
  173. #define __NR_quotactl 60
  174. __SYSCALL(__NR_quotactl, sys_quotactl)
  175. /* fs/readdir.c */
  176. #define __NR_getdents64 61
  177. __SYSCALL(__NR_getdents64, sys_getdents64)
  178. /* fs/read_write.c */
  179. #define __NR3264_lseek 62
  180. __SC_3264(__NR3264_lseek, sys_llseek, sys_lseek)
  181. #define __NR_read 63
  182. __SYSCALL(__NR_read, sys_read)
  183. #define __NR_write 64
  184. __SYSCALL(__NR_write, sys_write)
  185. #define __NR_readv 65
  186. __SC_COMP(__NR_readv, sys_readv, compat_sys_readv)
  187. #define __NR_writev 66
  188. __SC_COMP(__NR_writev, sys_writev, compat_sys_writev)
  189. #define __NR_pread64 67
  190. __SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64)
  191. #define __NR_pwrite64 68
  192. __SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64)
  193. #define __NR_preadv 69
  194. __SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv)
  195. #define __NR_pwritev 70
  196. __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev)
  197. /* fs/sendfile.c */
  198. #define __NR3264_sendfile 71
  199. __SYSCALL(__NR3264_sendfile, sys_sendfile64)
  200. /* fs/select.c */
  201. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  202. #define __NR_pselect6 72
  203. __SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32)
  204. #define __NR_ppoll 73
  205. __SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32)
  206. #endif
  207. /* fs/signalfd.c */
  208. #define __NR_signalfd4 74
  209. __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4)
  210. /* fs/splice.c */
  211. #define __NR_vmsplice 75
  212. __SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice)
  213. #define __NR_splice 76
  214. __SYSCALL(__NR_splice, sys_splice)
  215. #define __NR_tee 77
  216. __SYSCALL(__NR_tee, sys_tee)
  217. /* fs/stat.c */
  218. #define __NR_readlinkat 78
  219. __SYSCALL(__NR_readlinkat, sys_readlinkat)
  220. #if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
  221. #define __NR3264_fstatat 79
  222. __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat)
  223. #define __NR3264_fstat 80
  224. __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat)
  225. #endif
  226. /* fs/sync.c */
  227. #define __NR_sync 81
  228. __SYSCALL(__NR_sync, sys_sync)
  229. #define __NR_fsync 82
  230. __SYSCALL(__NR_fsync, sys_fsync)
  231. #define __NR_fdatasync 83
  232. __SYSCALL(__NR_fdatasync, sys_fdatasync)
  233. #ifdef __ARCH_WANT_SYNC_FILE_RANGE2
  234. #define __NR_sync_file_range2 84
  235. __SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \
  236. compat_sys_sync_file_range2)
  237. #else
  238. #define __NR_sync_file_range 84
  239. __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \
  240. compat_sys_sync_file_range)
  241. #endif
  242. /* fs/timerfd.c */
  243. #define __NR_timerfd_create 85
  244. __SYSCALL(__NR_timerfd_create, sys_timerfd_create)
  245. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  246. #define __NR_timerfd_settime 86
  247. __SC_3264(__NR_timerfd_settime, sys_timerfd_settime32, \
  248. sys_timerfd_settime)
  249. #define __NR_timerfd_gettime 87
  250. __SC_3264(__NR_timerfd_gettime, sys_timerfd_gettime32, \
  251. sys_timerfd_gettime)
  252. #endif
  253. /* fs/utimes.c */
  254. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  255. #define __NR_utimensat 88
  256. __SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat)
  257. #endif
  258. /* kernel/acct.c */
  259. #define __NR_acct 89
  260. __SYSCALL(__NR_acct, sys_acct)
  261. /* kernel/capability.c */
  262. #define __NR_capget 90
  263. __SYSCALL(__NR_capget, sys_capget)
  264. #define __NR_capset 91
  265. __SYSCALL(__NR_capset, sys_capset)
  266. /* kernel/exec_domain.c */
  267. #define __NR_personality 92
  268. __SYSCALL(__NR_personality, sys_personality)
  269. /* kernel/exit.c */
  270. #define __NR_exit 93
  271. __SYSCALL(__NR_exit, sys_exit)
  272. #define __NR_exit_group 94
  273. __SYSCALL(__NR_exit_group, sys_exit_group)
  274. #define __NR_waitid 95
  275. __SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid)
  276. /* kernel/fork.c */
  277. #define __NR_set_tid_address 96
  278. __SYSCALL(__NR_set_tid_address, sys_set_tid_address)
  279. #define __NR_unshare 97
  280. __SYSCALL(__NR_unshare, sys_unshare)
  281. /* kernel/futex.c */
  282. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  283. #define __NR_futex 98
  284. __SC_3264(__NR_futex, sys_futex_time32, sys_futex)
  285. #endif
  286. #define __NR_set_robust_list 99
  287. __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \
  288. compat_sys_set_robust_list)
  289. #define __NR_get_robust_list 100
  290. __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \
  291. compat_sys_get_robust_list)
  292. /* kernel/hrtimer.c */
  293. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  294. #define __NR_nanosleep 101
  295. __SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep)
  296. #endif
  297. /* kernel/itimer.c */
  298. #define __NR_getitimer 102
  299. __SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer)
  300. #define __NR_setitimer 103
  301. __SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer)
  302. /* kernel/kexec.c */
  303. #define __NR_kexec_load 104
  304. __SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load)
  305. /* kernel/module.c */
  306. #define __NR_init_module 105
  307. __SYSCALL(__NR_init_module, sys_init_module)
  308. #define __NR_delete_module 106
  309. __SYSCALL(__NR_delete_module, sys_delete_module)
  310. /* kernel/posix-timers.c */
  311. #define __NR_timer_create 107
  312. __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create)
  313. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  314. #define __NR_timer_gettime 108
  315. __SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime)
  316. #endif
  317. #define __NR_timer_getoverrun 109
  318. __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun)
  319. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  320. #define __NR_timer_settime 110
  321. __SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime)
  322. #endif
  323. #define __NR_timer_delete 111
  324. __SYSCALL(__NR_timer_delete, sys_timer_delete)
  325. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  326. #define __NR_clock_settime 112
  327. __SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime)
  328. #define __NR_clock_gettime 113
  329. __SC_3264(__NR_clock_gettime, sys_clock_gettime32, sys_clock_gettime)
  330. #define __NR_clock_getres 114
  331. __SC_3264(__NR_clock_getres, sys_clock_getres_time32, sys_clock_getres)
  332. #define __NR_clock_nanosleep 115
  333. __SC_3264(__NR_clock_nanosleep, sys_clock_nanosleep_time32, \
  334. sys_clock_nanosleep)
  335. #endif
  336. /* kernel/printk.c */
  337. #define __NR_syslog 116
  338. __SYSCALL(__NR_syslog, sys_syslog)
  339. /* kernel/ptrace.c */
  340. #define __NR_ptrace 117
  341. __SYSCALL(__NR_ptrace, sys_ptrace)
  342. /* kernel/sched/core.c */
  343. #define __NR_sched_setparam 118
  344. __SYSCALL(__NR_sched_setparam, sys_sched_setparam)
  345. #define __NR_sched_setscheduler 119
  346. __SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler)
  347. #define __NR_sched_getscheduler 120
  348. __SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
  349. #define __NR_sched_getparam 121
  350. __SYSCALL(__NR_sched_getparam, sys_sched_getparam)
  351. #define __NR_sched_setaffinity 122
  352. __SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \
  353. compat_sys_sched_setaffinity)
  354. #define __NR_sched_getaffinity 123
  355. __SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \
  356. compat_sys_sched_getaffinity)
  357. #define __NR_sched_yield 124
  358. __SYSCALL(__NR_sched_yield, sys_sched_yield)
  359. #define __NR_sched_get_priority_max 125
  360. __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
  361. #define __NR_sched_get_priority_min 126
  362. __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
  363. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  364. #define __NR_sched_rr_get_interval 127
  365. __SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \
  366. sys_sched_rr_get_interval)
  367. #endif
  368. /* kernel/signal.c */
  369. #define __NR_restart_syscall 128
  370. __SYSCALL(__NR_restart_syscall, sys_restart_syscall)
  371. #define __NR_kill 129
  372. __SYSCALL(__NR_kill, sys_kill)
  373. #define __NR_tkill 130
  374. __SYSCALL(__NR_tkill, sys_tkill)
  375. #define __NR_tgkill 131
  376. __SYSCALL(__NR_tgkill, sys_tgkill)
  377. #define __NR_sigaltstack 132
  378. __SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack)
  379. #define __NR_rt_sigsuspend 133
  380. __SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend)
  381. #define __NR_rt_sigaction 134
  382. __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction)
  383. #define __NR_rt_sigprocmask 135
  384. __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask)
  385. #define __NR_rt_sigpending 136
  386. __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending)
  387. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  388. #define __NR_rt_sigtimedwait 137
  389. __SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \
  390. sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32)
  391. #endif
  392. #define __NR_rt_sigqueueinfo 138
  393. __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \
  394. compat_sys_rt_sigqueueinfo)
  395. #define __NR_rt_sigreturn 139
  396. __SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn)
  397. /* kernel/sys.c */
  398. #define __NR_setpriority 140
  399. __SYSCALL(__NR_setpriority, sys_setpriority)
  400. #define __NR_getpriority 141
  401. __SYSCALL(__NR_getpriority, sys_getpriority)
  402. #define __NR_reboot 142
  403. __SYSCALL(__NR_reboot, sys_reboot)
  404. #define __NR_setregid 143
  405. __SYSCALL(__NR_setregid, sys_setregid)
  406. #define __NR_setgid 144
  407. __SYSCALL(__NR_setgid, sys_setgid)
  408. #define __NR_setreuid 145
  409. __SYSCALL(__NR_setreuid, sys_setreuid)
  410. #define __NR_setuid 146
  411. __SYSCALL(__NR_setuid, sys_setuid)
  412. #define __NR_setresuid 147
  413. __SYSCALL(__NR_setresuid, sys_setresuid)
  414. #define __NR_getresuid 148
  415. __SYSCALL(__NR_getresuid, sys_getresuid)
  416. #define __NR_setresgid 149
  417. __SYSCALL(__NR_setresgid, sys_setresgid)
  418. #define __NR_getresgid 150
  419. __SYSCALL(__NR_getresgid, sys_getresgid)
  420. #define __NR_setfsuid 151
  421. __SYSCALL(__NR_setfsuid, sys_setfsuid)
  422. #define __NR_setfsgid 152
  423. __SYSCALL(__NR_setfsgid, sys_setfsgid)
  424. #define __NR_times 153
  425. __SC_COMP(__NR_times, sys_times, compat_sys_times)
  426. #define __NR_setpgid 154
  427. __SYSCALL(__NR_setpgid, sys_setpgid)
  428. #define __NR_getpgid 155
  429. __SYSCALL(__NR_getpgid, sys_getpgid)
  430. #define __NR_getsid 156
  431. __SYSCALL(__NR_getsid, sys_getsid)
  432. #define __NR_setsid 157
  433. __SYSCALL(__NR_setsid, sys_setsid)
  434. #define __NR_getgroups 158
  435. __SYSCALL(__NR_getgroups, sys_getgroups)
  436. #define __NR_setgroups 159
  437. __SYSCALL(__NR_setgroups, sys_setgroups)
  438. #define __NR_uname 160
  439. __SYSCALL(__NR_uname, sys_newuname)
  440. #define __NR_sethostname 161
  441. __SYSCALL(__NR_sethostname, sys_sethostname)
  442. #define __NR_setdomainname 162
  443. __SYSCALL(__NR_setdomainname, sys_setdomainname)
  444. #ifdef __ARCH_WANT_SET_GET_RLIMIT
  445. /* getrlimit and setrlimit are superseded with prlimit64 */
  446. #define __NR_getrlimit 163
  447. __SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit)
  448. #define __NR_setrlimit 164
  449. __SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit)
  450. #endif
  451. #define __NR_getrusage 165
  452. __SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage)
  453. #define __NR_umask 166
  454. __SYSCALL(__NR_umask, sys_umask)
  455. #define __NR_prctl 167
  456. __SYSCALL(__NR_prctl, sys_prctl)
  457. #define __NR_getcpu 168
  458. __SYSCALL(__NR_getcpu, sys_getcpu)
  459. /* kernel/time.c */
  460. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  461. #define __NR_gettimeofday 169
  462. __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday)
  463. #define __NR_settimeofday 170
  464. __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday)
  465. #define __NR_adjtimex 171
  466. __SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex)
  467. #endif
  468. /* kernel/timer.c */
  469. #define __NR_getpid 172
  470. __SYSCALL(__NR_getpid, sys_getpid)
  471. #define __NR_getppid 173
  472. __SYSCALL(__NR_getppid, sys_getppid)
  473. #define __NR_getuid 174
  474. __SYSCALL(__NR_getuid, sys_getuid)
  475. #define __NR_geteuid 175
  476. __SYSCALL(__NR_geteuid, sys_geteuid)
  477. #define __NR_getgid 176
  478. __SYSCALL(__NR_getgid, sys_getgid)
  479. #define __NR_getegid 177
  480. __SYSCALL(__NR_getegid, sys_getegid)
  481. #define __NR_gettid 178
  482. __SYSCALL(__NR_gettid, sys_gettid)
  483. #define __NR_sysinfo 179
  484. __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo)
  485. /* ipc/mqueue.c */
  486. #define __NR_mq_open 180
  487. __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open)
  488. #define __NR_mq_unlink 181
  489. __SYSCALL(__NR_mq_unlink, sys_mq_unlink)
  490. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  491. #define __NR_mq_timedsend 182
  492. __SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend)
  493. #define __NR_mq_timedreceive 183
  494. __SC_3264(__NR_mq_timedreceive, sys_mq_timedreceive_time32, \
  495. sys_mq_timedreceive)
  496. #endif
  497. #define __NR_mq_notify 184
  498. __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify)
  499. #define __NR_mq_getsetattr 185
  500. __SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr)
  501. /* ipc/msg.c */
  502. #define __NR_msgget 186
  503. __SYSCALL(__NR_msgget, sys_msgget)
  504. #define __NR_msgctl 187
  505. __SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl)
  506. #define __NR_msgrcv 188
  507. __SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv)
  508. #define __NR_msgsnd 189
  509. __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd)
  510. /* ipc/sem.c */
  511. #define __NR_semget 190
  512. __SYSCALL(__NR_semget, sys_semget)
  513. #define __NR_semctl 191
  514. __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl)
  515. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  516. #define __NR_semtimedop 192
  517. __SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop)
  518. #endif
  519. #define __NR_semop 193
  520. __SYSCALL(__NR_semop, sys_semop)
  521. /* ipc/shm.c */
  522. #define __NR_shmget 194
  523. __SYSCALL(__NR_shmget, sys_shmget)
  524. #define __NR_shmctl 195
  525. __SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl)
  526. #define __NR_shmat 196
  527. __SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat)
  528. #define __NR_shmdt 197
  529. __SYSCALL(__NR_shmdt, sys_shmdt)
  530. /* net/socket.c */
  531. #define __NR_socket 198
  532. __SYSCALL(__NR_socket, sys_socket)
  533. #define __NR_socketpair 199
  534. __SYSCALL(__NR_socketpair, sys_socketpair)
  535. #define __NR_bind 200
  536. __SYSCALL(__NR_bind, sys_bind)
  537. #define __NR_listen 201
  538. __SYSCALL(__NR_listen, sys_listen)
  539. #define __NR_accept 202
  540. __SYSCALL(__NR_accept, sys_accept)
  541. #define __NR_connect 203
  542. __SYSCALL(__NR_connect, sys_connect)
  543. #define __NR_getsockname 204
  544. __SYSCALL(__NR_getsockname, sys_getsockname)
  545. #define __NR_getpeername 205
  546. __SYSCALL(__NR_getpeername, sys_getpeername)
  547. #define __NR_sendto 206
  548. __SYSCALL(__NR_sendto, sys_sendto)
  549. #define __NR_recvfrom 207
  550. __SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom)
  551. #define __NR_setsockopt 208
  552. __SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt)
  553. #define __NR_getsockopt 209
  554. __SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt)
  555. #define __NR_shutdown 210
  556. __SYSCALL(__NR_shutdown, sys_shutdown)
  557. #define __NR_sendmsg 211
  558. __SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg)
  559. #define __NR_recvmsg 212
  560. __SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg)
  561. /* mm/filemap.c */
  562. #define __NR_readahead 213
  563. __SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead)
  564. /* mm/nommu.c, also with MMU */
  565. #define __NR_brk 214
  566. __SYSCALL(__NR_brk, sys_brk)
  567. #define __NR_munmap 215
  568. __SYSCALL(__NR_munmap, sys_munmap)
  569. #define __NR_mremap 216
  570. __SYSCALL(__NR_mremap, sys_mremap)
  571. /* security/keys/keyctl.c */
  572. #define __NR_add_key 217
  573. __SYSCALL(__NR_add_key, sys_add_key)
  574. #define __NR_request_key 218
  575. __SYSCALL(__NR_request_key, sys_request_key)
  576. #define __NR_keyctl 219
  577. __SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl)
  578. /* arch/example/kernel/sys_example.c */
  579. #define __NR_clone 220
  580. __SYSCALL(__NR_clone, sys_clone)
  581. #define __NR_execve 221
  582. __SC_COMP(__NR_execve, sys_execve, compat_sys_execve)
  583. #define __NR3264_mmap 222
  584. __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
  585. /* mm/fadvise.c */
  586. #define __NR3264_fadvise64 223
  587. __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
  588. /* mm/, CONFIG_MMU only */
  589. #ifndef __ARCH_NOMMU
  590. #define __NR_swapon 224
  591. __SYSCALL(__NR_swapon, sys_swapon)
  592. #define __NR_swapoff 225
  593. __SYSCALL(__NR_swapoff, sys_swapoff)
  594. #define __NR_mprotect 226
  595. __SYSCALL(__NR_mprotect, sys_mprotect)
  596. #define __NR_msync 227
  597. __SYSCALL(__NR_msync, sys_msync)
  598. #define __NR_mlock 228
  599. __SYSCALL(__NR_mlock, sys_mlock)
  600. #define __NR_munlock 229
  601. __SYSCALL(__NR_munlock, sys_munlock)
  602. #define __NR_mlockall 230
  603. __SYSCALL(__NR_mlockall, sys_mlockall)
  604. #define __NR_munlockall 231
  605. __SYSCALL(__NR_munlockall, sys_munlockall)
  606. #define __NR_mincore 232
  607. __SYSCALL(__NR_mincore, sys_mincore)
  608. #define __NR_madvise 233
  609. __SYSCALL(__NR_madvise, sys_madvise)
  610. #define __NR_remap_file_pages 234
  611. __SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
  612. #define __NR_mbind 235
  613. __SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind)
  614. #define __NR_get_mempolicy 236
  615. __SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy)
  616. #define __NR_set_mempolicy 237
  617. __SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy)
  618. #define __NR_migrate_pages 238
  619. __SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages)
  620. #define __NR_move_pages 239
  621. __SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages)
  622. #endif
  623. #define __NR_rt_tgsigqueueinfo 240
  624. __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \
  625. compat_sys_rt_tgsigqueueinfo)
  626. #define __NR_perf_event_open 241
  627. __SYSCALL(__NR_perf_event_open, sys_perf_event_open)
  628. #define __NR_accept4 242
  629. __SYSCALL(__NR_accept4, sys_accept4)
  630. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  631. #define __NR_recvmmsg 243
  632. __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32)
  633. #endif
  634. /*
  635. * Architectures may provide up to 16 syscalls of their own
  636. * starting with this value.
  637. */
  638. #define __NR_arch_specific_syscall 244
  639. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  640. #define __NR_wait4 260
  641. __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4)
  642. #endif
  643. #define __NR_prlimit64 261
  644. __SYSCALL(__NR_prlimit64, sys_prlimit64)
  645. #define __NR_fanotify_init 262
  646. __SYSCALL(__NR_fanotify_init, sys_fanotify_init)
  647. #define __NR_fanotify_mark 263
  648. __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)
  649. #define __NR_name_to_handle_at 264
  650. __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)
  651. #define __NR_open_by_handle_at 265
  652. __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at)
  653. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  654. #define __NR_clock_adjtime 266
  655. __SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime)
  656. #endif
  657. #define __NR_syncfs 267
  658. __SYSCALL(__NR_syncfs, sys_syncfs)
  659. #define __NR_setns 268
  660. __SYSCALL(__NR_setns, sys_setns)
  661. #define __NR_sendmmsg 269
  662. __SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg)
  663. #define __NR_process_vm_readv 270
  664. __SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \
  665. compat_sys_process_vm_readv)
  666. #define __NR_process_vm_writev 271
  667. __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \
  668. compat_sys_process_vm_writev)
  669. #define __NR_kcmp 272
  670. __SYSCALL(__NR_kcmp, sys_kcmp)
  671. #define __NR_finit_module 273
  672. __SYSCALL(__NR_finit_module, sys_finit_module)
  673. #define __NR_sched_setattr 274
  674. __SYSCALL(__NR_sched_setattr, sys_sched_setattr)
  675. #define __NR_sched_getattr 275
  676. __SYSCALL(__NR_sched_getattr, sys_sched_getattr)
  677. #define __NR_renameat2 276
  678. __SYSCALL(__NR_renameat2, sys_renameat2)
  679. #define __NR_seccomp 277
  680. __SYSCALL(__NR_seccomp, sys_seccomp)
  681. #define __NR_getrandom 278
  682. __SYSCALL(__NR_getrandom, sys_getrandom)
  683. #define __NR_memfd_create 279
  684. __SYSCALL(__NR_memfd_create, sys_memfd_create)
  685. #define __NR_bpf 280
  686. __SYSCALL(__NR_bpf, sys_bpf)
  687. #define __NR_execveat 281
  688. __SC_COMP(__NR_execveat, sys_execveat, compat_sys_execveat)
  689. #define __NR_userfaultfd 282
  690. __SYSCALL(__NR_userfaultfd, sys_userfaultfd)
  691. #define __NR_membarrier 283
  692. __SYSCALL(__NR_membarrier, sys_membarrier)
  693. #define __NR_mlock2 284
  694. __SYSCALL(__NR_mlock2, sys_mlock2)
  695. #define __NR_copy_file_range 285
  696. __SYSCALL(__NR_copy_file_range, sys_copy_file_range)
  697. #define __NR_preadv2 286
  698. __SC_COMP(__NR_preadv2, sys_preadv2, compat_sys_preadv2)
  699. #define __NR_pwritev2 287
  700. __SC_COMP(__NR_pwritev2, sys_pwritev2, compat_sys_pwritev2)
  701. #define __NR_pkey_mprotect 288
  702. __SYSCALL(__NR_pkey_mprotect, sys_pkey_mprotect)
  703. #define __NR_pkey_alloc 289
  704. __SYSCALL(__NR_pkey_alloc, sys_pkey_alloc)
  705. #define __NR_pkey_free 290
  706. __SYSCALL(__NR_pkey_free, sys_pkey_free)
  707. #define __NR_statx 291
  708. __SYSCALL(__NR_statx, sys_statx)
  709. #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32
  710. #define __NR_io_pgetevents 292
  711. __SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents)
  712. #endif
  713. #define __NR_rseq 293
  714. __SYSCALL(__NR_rseq, sys_rseq)
  715. #define __NR_kexec_file_load 294
  716. __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load)
  717. /* 295 through 402 are unassigned to sync up with generic numbers, don't use */
  718. #if __BITS_PER_LONG == 32
  719. #define __NR_clock_gettime64 403
  720. __SYSCALL(__NR_clock_gettime64, sys_clock_gettime)
  721. #define __NR_clock_settime64 404
  722. __SYSCALL(__NR_clock_settime64, sys_clock_settime)
  723. #define __NR_clock_adjtime64 405
  724. __SYSCALL(__NR_clock_adjtime64, sys_clock_adjtime)
  725. #define __NR_clock_getres_time64 406
  726. __SYSCALL(__NR_clock_getres_time64, sys_clock_getres)
  727. #define __NR_clock_nanosleep_time64 407
  728. __SYSCALL(__NR_clock_nanosleep_time64, sys_clock_nanosleep)
  729. #define __NR_timer_gettime64 408
  730. __SYSCALL(__NR_timer_gettime64, sys_timer_gettime)
  731. #define __NR_timer_settime64 409
  732. __SYSCALL(__NR_timer_settime64, sys_timer_settime)
  733. #define __NR_timerfd_gettime64 410
  734. __SYSCALL(__NR_timerfd_gettime64, sys_timerfd_gettime)
  735. #define __NR_timerfd_settime64 411
  736. __SYSCALL(__NR_timerfd_settime64, sys_timerfd_settime)
  737. #define __NR_utimensat_time64 412
  738. __SYSCALL(__NR_utimensat_time64, sys_utimensat)
  739. #define __NR_pselect6_time64 413
  740. __SC_COMP(__NR_pselect6_time64, sys_pselect6, compat_sys_pselect6_time64)
  741. #define __NR_ppoll_time64 414
  742. __SC_COMP(__NR_ppoll_time64, sys_ppoll, compat_sys_ppoll_time64)
  743. #define __NR_io_pgetevents_time64 416
  744. __SYSCALL(__NR_io_pgetevents_time64, sys_io_pgetevents)
  745. #define __NR_recvmmsg_time64 417
  746. __SC_COMP(__NR_recvmmsg_time64, sys_recvmmsg, compat_sys_recvmmsg_time64)
  747. #define __NR_mq_timedsend_time64 418
  748. __SYSCALL(__NR_mq_timedsend_time64, sys_mq_timedsend)
  749. #define __NR_mq_timedreceive_time64 419
  750. __SYSCALL(__NR_mq_timedreceive_time64, sys_mq_timedreceive)
  751. #define __NR_semtimedop_time64 420
  752. __SYSCALL(__NR_semtimedop_time64, sys_semtimedop)
  753. #define __NR_rt_sigtimedwait_time64 421
  754. __SC_COMP(__NR_rt_sigtimedwait_time64, sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time64)
  755. #define __NR_futex_time64 422
  756. __SYSCALL(__NR_futex_time64, sys_futex)
  757. #define __NR_sched_rr_get_interval_time64 423
  758. __SYSCALL(__NR_sched_rr_get_interval_time64, sys_sched_rr_get_interval)
  759. #endif
  760. #define __NR_pidfd_send_signal 424
  761. __SYSCALL(__NR_pidfd_send_signal, sys_pidfd_send_signal)
  762. #define __NR_io_uring_setup 425
  763. __SYSCALL(__NR_io_uring_setup, sys_io_uring_setup)
  764. #define __NR_io_uring_enter 426
  765. __SYSCALL(__NR_io_uring_enter, sys_io_uring_enter)
  766. #define __NR_io_uring_register 427
  767. __SYSCALL(__NR_io_uring_register, sys_io_uring_register)
  768. #define __NR_open_tree 428
  769. __SYSCALL(__NR_open_tree, sys_open_tree)
  770. #define __NR_move_mount 429
  771. __SYSCALL(__NR_move_mount, sys_move_mount)
  772. #define __NR_fsopen 430
  773. __SYSCALL(__NR_fsopen, sys_fsopen)
  774. #define __NR_fsconfig 431
  775. __SYSCALL(__NR_fsconfig, sys_fsconfig)
  776. #define __NR_fsmount 432
  777. __SYSCALL(__NR_fsmount, sys_fsmount)
  778. #define __NR_fspick 433
  779. __SYSCALL(__NR_fspick, sys_fspick)
  780. #define __NR_pidfd_open 434
  781. __SYSCALL(__NR_pidfd_open, sys_pidfd_open)
  782. #ifdef __ARCH_WANT_SYS_CLONE3
  783. #define __NR_clone3 435
  784. __SYSCALL(__NR_clone3, sys_clone3)
  785. #endif
  786. #undef __NR_syscalls
  787. #define __NR_syscalls 436
  788. /*
  789. * 32 bit systems traditionally used different
  790. * syscalls for off_t and loff_t arguments, while
  791. * 64 bit systems only need the off_t version.
  792. * For new 32 bit platforms, there is no need to
  793. * implement the old 32 bit off_t syscalls, so
  794. * they take different names.
  795. * Here we map the numbers so that both versions
  796. * use the same syscall table layout.
  797. */
  798. #if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT)
  799. #define __NR_fcntl __NR3264_fcntl
  800. #define __NR_statfs __NR3264_statfs
  801. #define __NR_fstatfs __NR3264_fstatfs
  802. #define __NR_truncate __NR3264_truncate
  803. #define __NR_ftruncate __NR3264_ftruncate
  804. #define __NR_lseek __NR3264_lseek
  805. #define __NR_sendfile __NR3264_sendfile
  806. #if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
  807. #define __NR_newfstatat __NR3264_fstatat
  808. #define __NR_fstat __NR3264_fstat
  809. #endif
  810. #define __NR_mmap __NR3264_mmap
  811. #define __NR_fadvise64 __NR3264_fadvise64
  812. #ifdef __NR3264_stat
  813. #define __NR_stat __NR3264_stat
  814. #define __NR_lstat __NR3264_lstat
  815. #endif
  816. #else
  817. #define __NR_fcntl64 __NR3264_fcntl
  818. #define __NR_statfs64 __NR3264_statfs
  819. #define __NR_fstatfs64 __NR3264_fstatfs
  820. #define __NR_truncate64 __NR3264_truncate
  821. #define __NR_ftruncate64 __NR3264_ftruncate
  822. #define __NR_llseek __NR3264_lseek
  823. #define __NR_sendfile64 __NR3264_sendfile
  824. #if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
  825. #define __NR_fstatat64 __NR3264_fstatat
  826. #define __NR_fstat64 __NR3264_fstat
  827. #endif
  828. #define __NR_mmap2 __NR3264_mmap
  829. #define __NR_fadvise64_64 __NR3264_fadvise64
  830. #ifdef __NR3264_stat
  831. #define __NR_stat64 __NR3264_stat
  832. #define __NR_lstat64 __NR3264_lstat
  833. #endif
  834. #endif