syscall.inc 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. ; vim:ft=fasm:
  2. ; generated with:
  3. ;
  4. ;
  5. ; FANCY_SYSCALL ?= | sort -nk 3 | column -t
  6. ; ${SYSCALL_INC}:
  7. ; mkdir -p '$(dir $@)'
  8. ; { echo '; vim: ft=fasm:' \
  9. ; ; echo 'if ~ definite syscall' \
  10. ; ; echo 'namespace syscall' \
  11. ; ; echo '#include <sys/syscall.h>' \
  12. ; | cpp -dM \
  13. ; | sed -n 's/^#define\s\(SYS_[^ ]\+\) \([0-9]\+\)$$/\1 equ \2/p' \
  14. ; ${FANCY_SYSCALL} \
  15. ; ; echo 'end namespace' \
  16. ; ; echo 'end if' \
  17. ; ; } > $@
  18. if ~ definite syscall
  19. namespace syscall
  20. SYS_read equ 0
  21. SYS_write equ 1
  22. SYS_open equ 2
  23. SYS_close equ 3
  24. SYS_stat equ 4
  25. SYS_fstat equ 5
  26. SYS_lstat equ 6
  27. SYS_poll equ 7
  28. SYS_lseek equ 8
  29. SYS_mmap equ 9
  30. SYS_mprotect equ 10
  31. SYS_munmap equ 11
  32. SYS_brk equ 12
  33. SYS_rt_sigaction equ 13
  34. SYS_rt_sigprocmask equ 14
  35. SYS_rt_sigreturn equ 15
  36. SYS_ioctl equ 16
  37. SYS_pread64 equ 17
  38. SYS_pwrite64 equ 18
  39. SYS_readv equ 19
  40. SYS_writev equ 20
  41. SYS_access equ 21
  42. SYS_pipe equ 22
  43. SYS_select equ 23
  44. SYS_sched_yield equ 24
  45. SYS_mremap equ 25
  46. SYS_msync equ 26
  47. SYS_mincore equ 27
  48. SYS_madvise equ 28
  49. SYS_shmget equ 29
  50. SYS_shmat equ 30
  51. SYS_shmctl equ 31
  52. SYS_dup equ 32
  53. SYS_dup2 equ 33
  54. SYS_pause equ 34
  55. SYS_nanosleep equ 35
  56. SYS_getitimer equ 36
  57. SYS_alarm equ 37
  58. SYS_setitimer equ 38
  59. SYS_getpid equ 39
  60. SYS_sendfile equ 40
  61. SYS_socket equ 41
  62. SYS_connect equ 42
  63. SYS_accept equ 43
  64. SYS_sendto equ 44
  65. SYS_recvfrom equ 45
  66. SYS_sendmsg equ 46
  67. SYS_recvmsg equ 47
  68. SYS_shutdown equ 48
  69. SYS_bind equ 49
  70. SYS_listen equ 50
  71. SYS_getsockname equ 51
  72. SYS_getpeername equ 52
  73. SYS_socketpair equ 53
  74. SYS_setsockopt equ 54
  75. SYS_getsockopt equ 55
  76. SYS_clone equ 56
  77. SYS_fork equ 57
  78. SYS_vfork equ 58
  79. SYS_execve equ 59
  80. SYS_exit equ 60
  81. SYS_wait4 equ 61
  82. SYS_kill equ 62
  83. SYS_uname equ 63
  84. SYS_semget equ 64
  85. SYS_semop equ 65
  86. SYS_semctl equ 66
  87. SYS_shmdt equ 67
  88. SYS_msgget equ 68
  89. SYS_msgsnd equ 69
  90. SYS_msgrcv equ 70
  91. SYS_msgctl equ 71
  92. SYS_fcntl equ 72
  93. SYS_flock equ 73
  94. SYS_fsync equ 74
  95. SYS_fdatasync equ 75
  96. SYS_truncate equ 76
  97. SYS_ftruncate equ 77
  98. SYS_getdents equ 78
  99. SYS_getcwd equ 79
  100. SYS_chdir equ 80
  101. SYS_fchdir equ 81
  102. SYS_rename equ 82
  103. SYS_mkdir equ 83
  104. SYS_rmdir equ 84
  105. SYS_creat equ 85
  106. SYS_link equ 86
  107. SYS_unlink equ 87
  108. SYS_symlink equ 88
  109. SYS_readlink equ 89
  110. SYS_chmod equ 90
  111. SYS_fchmod equ 91
  112. SYS_chown equ 92
  113. SYS_fchown equ 93
  114. SYS_lchown equ 94
  115. SYS_umask equ 95
  116. SYS_gettimeofday equ 96
  117. SYS_getrlimit equ 97
  118. SYS_getrusage equ 98
  119. SYS_sysinfo equ 99
  120. SYS_times equ 100
  121. SYS_ptrace equ 101
  122. SYS_getuid equ 102
  123. SYS_syslog equ 103
  124. SYS_getgid equ 104
  125. SYS_setuid equ 105
  126. SYS_setgid equ 106
  127. SYS_geteuid equ 107
  128. SYS_getegid equ 108
  129. SYS_setpgid equ 109
  130. SYS_getppid equ 110
  131. SYS_getpgrp equ 111
  132. SYS_setsid equ 112
  133. SYS_setreuid equ 113
  134. SYS_setregid equ 114
  135. SYS_getgroups equ 115
  136. SYS_setgroups equ 116
  137. SYS_setresuid equ 117
  138. SYS_getresuid equ 118
  139. SYS_setresgid equ 119
  140. SYS_getresgid equ 120
  141. SYS_getpgid equ 121
  142. SYS_setfsuid equ 122
  143. SYS_setfsgid equ 123
  144. SYS_getsid equ 124
  145. SYS_capget equ 125
  146. SYS_capset equ 126
  147. SYS_rt_sigpending equ 127
  148. SYS_rt_sigtimedwait equ 128
  149. SYS_rt_sigqueueinfo equ 129
  150. SYS_rt_sigsuspend equ 130
  151. SYS_sigaltstack equ 131
  152. SYS_utime equ 132
  153. SYS_mknod equ 133
  154. SYS_uselib equ 134
  155. SYS_personality equ 135
  156. SYS_ustat equ 136
  157. SYS_statfs equ 137
  158. SYS_fstatfs equ 138
  159. SYS_sysfs equ 139
  160. SYS_getpriority equ 140
  161. SYS_setpriority equ 141
  162. SYS_sched_setparam equ 142
  163. SYS_sched_getparam equ 143
  164. SYS_sched_setscheduler equ 144
  165. SYS_sched_getscheduler equ 145
  166. SYS_sched_get_priority_max equ 146
  167. SYS_sched_get_priority_min equ 147
  168. SYS_sched_rr_get_interval equ 148
  169. SYS_mlock equ 149
  170. SYS_munlock equ 150
  171. SYS_mlockall equ 151
  172. SYS_munlockall equ 152
  173. SYS_vhangup equ 153
  174. SYS_modify_ldt equ 154
  175. SYS_pivot_root equ 155
  176. SYS__sysctl equ 156
  177. SYS_prctl equ 157
  178. SYS_arch_prctl equ 158
  179. SYS_adjtimex equ 159
  180. SYS_setrlimit equ 160
  181. SYS_chroot equ 161
  182. SYS_sync equ 162
  183. SYS_acct equ 163
  184. SYS_settimeofday equ 164
  185. SYS_mount equ 165
  186. SYS_umount2 equ 166
  187. SYS_swapon equ 167
  188. SYS_swapoff equ 168
  189. SYS_reboot equ 169
  190. SYS_sethostname equ 170
  191. SYS_setdomainname equ 171
  192. SYS_iopl equ 172
  193. SYS_ioperm equ 173
  194. SYS_create_module equ 174
  195. SYS_init_module equ 175
  196. SYS_delete_module equ 176
  197. SYS_get_kernel_syms equ 177
  198. SYS_query_module equ 178
  199. SYS_quotactl equ 179
  200. SYS_nfsservctl equ 180
  201. SYS_getpmsg equ 181
  202. SYS_putpmsg equ 182
  203. SYS_afs_syscall equ 183
  204. SYS_tuxcall equ 184
  205. SYS_security equ 185
  206. SYS_gettid equ 186
  207. SYS_readahead equ 187
  208. SYS_setxattr equ 188
  209. SYS_lsetxattr equ 189
  210. SYS_fsetxattr equ 190
  211. SYS_getxattr equ 191
  212. SYS_lgetxattr equ 192
  213. SYS_fgetxattr equ 193
  214. SYS_listxattr equ 194
  215. SYS_llistxattr equ 195
  216. SYS_flistxattr equ 196
  217. SYS_removexattr equ 197
  218. SYS_lremovexattr equ 198
  219. SYS_fremovexattr equ 199
  220. SYS_tkill equ 200
  221. SYS_time equ 201
  222. SYS_futex equ 202
  223. SYS_sched_setaffinity equ 203
  224. SYS_sched_getaffinity equ 204
  225. SYS_set_thread_area equ 205
  226. SYS_io_setup equ 206
  227. SYS_io_destroy equ 207
  228. SYS_io_getevents equ 208
  229. SYS_io_submit equ 209
  230. SYS_io_cancel equ 210
  231. SYS_get_thread_area equ 211
  232. SYS_lookup_dcookie equ 212
  233. SYS_epoll_create equ 213
  234. SYS_epoll_ctl_old equ 214
  235. SYS_epoll_wait_old equ 215
  236. SYS_remap_file_pages equ 216
  237. SYS_getdents64 equ 217
  238. SYS_set_tid_address equ 218
  239. SYS_restart_syscall equ 219
  240. SYS_semtimedop equ 220
  241. SYS_fadvise64 equ 221
  242. SYS_timer_create equ 222
  243. SYS_timer_settime equ 223
  244. SYS_timer_gettime equ 224
  245. SYS_timer_getoverrun equ 225
  246. SYS_timer_delete equ 226
  247. SYS_clock_settime equ 227
  248. SYS_clock_gettime equ 228
  249. SYS_clock_getres equ 229
  250. SYS_clock_nanosleep equ 230
  251. SYS_exit_group equ 231
  252. SYS_epoll_wait equ 232
  253. SYS_epoll_ctl equ 233
  254. SYS_tgkill equ 234
  255. SYS_utimes equ 235
  256. SYS_vserver equ 236
  257. SYS_mbind equ 237
  258. SYS_set_mempolicy equ 238
  259. SYS_get_mempolicy equ 239
  260. SYS_mq_open equ 240
  261. SYS_mq_unlink equ 241
  262. SYS_mq_timedsend equ 242
  263. SYS_mq_timedreceive equ 243
  264. SYS_mq_notify equ 244
  265. SYS_mq_getsetattr equ 245
  266. SYS_kexec_load equ 246
  267. SYS_waitid equ 247
  268. SYS_add_key equ 248
  269. SYS_request_key equ 249
  270. SYS_keyctl equ 250
  271. SYS_ioprio_set equ 251
  272. SYS_ioprio_get equ 252
  273. SYS_inotify_init equ 253
  274. SYS_inotify_add_watch equ 254
  275. SYS_inotify_rm_watch equ 255
  276. SYS_migrate_pages equ 256
  277. SYS_openat equ 257
  278. SYS_mkdirat equ 258
  279. SYS_mknodat equ 259
  280. SYS_fchownat equ 260
  281. SYS_futimesat equ 261
  282. SYS_newfstatat equ 262
  283. SYS_unlinkat equ 263
  284. SYS_renameat equ 264
  285. SYS_linkat equ 265
  286. SYS_symlinkat equ 266
  287. SYS_readlinkat equ 267
  288. SYS_fchmodat equ 268
  289. SYS_faccessat equ 269
  290. SYS_pselect6 equ 270
  291. SYS_ppoll equ 271
  292. SYS_unshare equ 272
  293. SYS_set_robust_list equ 273
  294. SYS_get_robust_list equ 274
  295. SYS_splice equ 275
  296. SYS_tee equ 276
  297. SYS_sync_file_range equ 277
  298. SYS_vmsplice equ 278
  299. SYS_move_pages equ 279
  300. SYS_utimensat equ 280
  301. SYS_epoll_pwait equ 281
  302. SYS_signalfd equ 282
  303. SYS_timerfd_create equ 283
  304. SYS_eventfd equ 284
  305. SYS_fallocate equ 285
  306. SYS_timerfd_settime equ 286
  307. SYS_timerfd_gettime equ 287
  308. SYS_accept4 equ 288
  309. SYS_signalfd4 equ 289
  310. SYS_eventfd2 equ 290
  311. SYS_epoll_create1 equ 291
  312. SYS_dup3 equ 292
  313. SYS_pipe2 equ 293
  314. SYS_inotify_init1 equ 294
  315. SYS_preadv equ 295
  316. SYS_pwritev equ 296
  317. SYS_rt_tgsigqueueinfo equ 297
  318. SYS_perf_event_open equ 298
  319. SYS_recvmmsg equ 299
  320. SYS_fanotify_init equ 300
  321. SYS_fanotify_mark equ 301
  322. SYS_prlimit64 equ 302
  323. SYS_name_to_handle_at equ 303
  324. SYS_open_by_handle_at equ 304
  325. SYS_clock_adjtime equ 305
  326. SYS_syncfs equ 306
  327. SYS_sendmmsg equ 307
  328. SYS_setns equ 308
  329. SYS_getcpu equ 309
  330. SYS_process_vm_readv equ 310
  331. SYS_process_vm_writev equ 311
  332. SYS_kcmp equ 312
  333. SYS_finit_module equ 313
  334. SYS_sched_setattr equ 314
  335. SYS_sched_getattr equ 315
  336. SYS_renameat2 equ 316
  337. SYS_seccomp equ 317
  338. SYS_getrandom equ 318
  339. SYS_memfd_create equ 319
  340. SYS_kexec_file_load equ 320
  341. SYS_bpf equ 321
  342. SYS_execveat equ 322
  343. SYS_userfaultfd equ 323
  344. SYS_membarrier equ 324
  345. SYS_mlock2 equ 325
  346. SYS_copy_file_range equ 326
  347. SYS_preadv2 equ 327
  348. SYS_pwritev2 equ 328
  349. SYS_pkey_mprotect equ 329
  350. SYS_pkey_alloc equ 330
  351. SYS_pkey_free equ 331
  352. SYS_statx equ 332
  353. SYS_io_pgetevents equ 333
  354. SYS_rseq equ 334
  355. SYS_pidfd_send_signal equ 424
  356. SYS_io_uring_setup equ 425
  357. SYS_io_uring_enter equ 426
  358. SYS_io_uring_register equ 427
  359. SYS_open_tree equ 428
  360. SYS_move_mount equ 429
  361. SYS_fsopen equ 430
  362. SYS_fsconfig equ 431
  363. SYS_fsmount equ 432
  364. SYS_fspick equ 433
  365. SYS_pidfd_open equ 434
  366. SYS_clone3 equ 435
  367. SYS_close_range equ 436
  368. SYS_openat2 equ 437
  369. SYS_pidfd_getfd equ 438
  370. SYS_faccessat2 equ 439
  371. SYS_process_madvise equ 440
  372. SYS_epoll_pwait2 equ 441
  373. SYS_mount_setattr equ 442
  374. SYS_landlock_create_ruleset equ 444
  375. SYS_landlock_add_rule equ 445
  376. SYS_landlock_restrict_self equ 446
  377. end namespace
  378. end if