unistd.h 30 KB

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