unistd.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. /*
  2. * include/asm-xtensa/unistd.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 2001 - 2005 Tensilica Inc.
  9. */
  10. #ifndef _XTENSA_UNISTD_H
  11. #define _XTENSA_UNISTD_H
  12. #ifndef __SYSCALL
  13. # define __SYSCALL(nr,func,nargs)
  14. #endif
  15. #define __NR_spill 0
  16. __SYSCALL( 0, sys_ni_syscall, 0)
  17. #define __NR_xtensa 1
  18. __SYSCALL( 1, sys_ni_syscall, 0)
  19. #define __NR_available4 2
  20. __SYSCALL( 2, sys_ni_syscall, 0)
  21. #define __NR_available5 3
  22. __SYSCALL( 3, sys_ni_syscall, 0)
  23. #define __NR_available6 4
  24. __SYSCALL( 4, sys_ni_syscall, 0)
  25. #define __NR_available7 5
  26. __SYSCALL( 5, sys_ni_syscall, 0)
  27. #define __NR_available8 6
  28. __SYSCALL( 6, sys_ni_syscall, 0)
  29. #define __NR_available9 7
  30. __SYSCALL( 7, sys_ni_syscall, 0)
  31. /* File Operations */
  32. #define __NR_open 8
  33. __SYSCALL( 8, sys_open, 3)
  34. #define __NR_close 9
  35. __SYSCALL( 9, sys_close, 1)
  36. #define __NR_dup 10
  37. __SYSCALL( 10, sys_dup, 1)
  38. #define __NR_dup2 11
  39. __SYSCALL( 11, sys_dup2, 2)
  40. #define __NR_read 12
  41. __SYSCALL( 12, sys_read, 3)
  42. #define __NR_write 13
  43. __SYSCALL( 13, sys_write, 3)
  44. #define __NR_select 14
  45. __SYSCALL( 14, sys_select, 5)
  46. #define __NR_lseek 15
  47. __SYSCALL( 15, sys_lseek, 3)
  48. #define __NR_poll 16
  49. __SYSCALL( 16, sys_poll, 3)
  50. #define __NR__llseek 17
  51. __SYSCALL( 17, sys_llseek, 5)
  52. #define __NR_epoll_wait 18
  53. __SYSCALL( 18, sys_epoll_wait, 4)
  54. #define __NR_epoll_ctl 19
  55. __SYSCALL( 19, sys_epoll_ctl, 4)
  56. #define __NR_epoll_create 20
  57. __SYSCALL( 20, sys_epoll_create, 1)
  58. #define __NR_creat 21
  59. __SYSCALL( 21, sys_creat, 2)
  60. #define __NR_truncate 22
  61. __SYSCALL( 22, sys_truncate, 2)
  62. #define __NR_ftruncate 23
  63. __SYSCALL( 23, sys_ftruncate, 2)
  64. #define __NR_readv 24
  65. __SYSCALL( 24, sys_readv, 3)
  66. #define __NR_writev 25
  67. __SYSCALL( 25, sys_writev, 3)
  68. #define __NR_fsync 26
  69. __SYSCALL( 26, sys_fsync, 1)
  70. #define __NR_fdatasync 27
  71. __SYSCALL( 27, sys_fdatasync, 1)
  72. #define __NR_truncate64 28
  73. __SYSCALL( 28, sys_truncate64, 2)
  74. #define __NR_ftruncate64 29
  75. __SYSCALL( 29, sys_ftruncate64, 2)
  76. #define __NR_pread64 30
  77. __SYSCALL( 30, sys_pread64, 6)
  78. #define __NR_pwrite64 31
  79. __SYSCALL( 31, sys_pwrite64, 6)
  80. #define __NR_link 32
  81. __SYSCALL( 32, sys_link, 2)
  82. #define __NR_rename 33
  83. __SYSCALL( 33, sys_rename, 2)
  84. #define __NR_symlink 34
  85. __SYSCALL( 34, sys_symlink, 2)
  86. #define __NR_readlink 35
  87. __SYSCALL( 35, sys_readlink, 3)
  88. #define __NR_mknod 36
  89. __SYSCALL( 36, sys_mknod, 3)
  90. #define __NR_pipe 37
  91. __SYSCALL( 37, sys_pipe, 1)
  92. #define __NR_unlink 38
  93. __SYSCALL( 38, sys_unlink, 1)
  94. #define __NR_rmdir 39
  95. __SYSCALL( 39, sys_rmdir, 1)
  96. #define __NR_mkdir 40
  97. __SYSCALL( 40, sys_mkdir, 2)
  98. #define __NR_chdir 41
  99. __SYSCALL( 41, sys_chdir, 1)
  100. #define __NR_fchdir 42
  101. __SYSCALL( 42, sys_fchdir, 1)
  102. #define __NR_getcwd 43
  103. __SYSCALL( 43, sys_getcwd, 2)
  104. #define __NR_chmod 44
  105. __SYSCALL( 44, sys_chmod, 2)
  106. #define __NR_chown 45
  107. __SYSCALL( 45, sys_chown, 3)
  108. #define __NR_stat 46
  109. __SYSCALL( 46, sys_newstat, 2)
  110. #define __NR_stat64 47
  111. __SYSCALL( 47, sys_stat64, 2)
  112. #define __NR_lchown 48
  113. __SYSCALL( 48, sys_lchown, 3)
  114. #define __NR_lstat 49
  115. __SYSCALL( 49, sys_newlstat, 2)
  116. #define __NR_lstat64 50
  117. __SYSCALL( 50, sys_lstat64, 2)
  118. #define __NR_available51 51
  119. __SYSCALL( 51, sys_ni_syscall, 0)
  120. #define __NR_fchmod 52
  121. __SYSCALL( 52, sys_fchmod, 2)
  122. #define __NR_fchown 53
  123. __SYSCALL( 53, sys_fchown, 3)
  124. #define __NR_fstat 54
  125. __SYSCALL( 54, sys_newfstat, 2)
  126. #define __NR_fstat64 55
  127. __SYSCALL( 55, sys_fstat64, 2)
  128. #define __NR_flock 56
  129. __SYSCALL( 56, sys_flock, 2)
  130. #define __NR_access 57
  131. __SYSCALL( 57, sys_access, 2)
  132. #define __NR_umask 58
  133. __SYSCALL( 58, sys_umask, 1)
  134. #define __NR_getdents 59
  135. __SYSCALL( 59, sys_getdents, 3)
  136. #define __NR_getdents64 60
  137. __SYSCALL( 60, sys_getdents64, 3)
  138. #define __NR_fcntl64 61
  139. __SYSCALL( 61, sys_fcntl64, 3)
  140. #define __NR_available62 62
  141. __SYSCALL( 62, sys_ni_syscall, 0)
  142. #define __NR_fadvise64_64 63
  143. __SYSCALL( 63, xtensa_fadvise64_64, 6)
  144. #define __NR_utime 64 /* glibc 2.3.3 ?? */
  145. __SYSCALL( 64, sys_utime, 2)
  146. #define __NR_utimes 65
  147. __SYSCALL( 65, sys_utimes, 2)
  148. #define __NR_ioctl 66
  149. __SYSCALL( 66, sys_ioctl, 3)
  150. #define __NR_fcntl 67
  151. __SYSCALL( 67, sys_fcntl, 3)
  152. #define __NR_setxattr 68
  153. __SYSCALL( 68, sys_setxattr, 5)
  154. #define __NR_getxattr 69
  155. __SYSCALL( 69, sys_getxattr, 4)
  156. #define __NR_listxattr 70
  157. __SYSCALL( 70, sys_listxattr, 3)
  158. #define __NR_removexattr 71
  159. __SYSCALL( 71, sys_removexattr, 2)
  160. #define __NR_lsetxattr 72
  161. __SYSCALL( 72, sys_lsetxattr, 5)
  162. #define __NR_lgetxattr 73
  163. __SYSCALL( 73, sys_lgetxattr, 4)
  164. #define __NR_llistxattr 74
  165. __SYSCALL( 74, sys_llistxattr, 3)
  166. #define __NR_lremovexattr 75
  167. __SYSCALL( 75, sys_lremovexattr, 2)
  168. #define __NR_fsetxattr 76
  169. __SYSCALL( 76, sys_fsetxattr, 5)
  170. #define __NR_fgetxattr 77
  171. __SYSCALL( 77, sys_fgetxattr, 4)
  172. #define __NR_flistxattr 78
  173. __SYSCALL( 78, sys_flistxattr, 3)
  174. #define __NR_fremovexattr 79
  175. __SYSCALL( 79, sys_fremovexattr, 2)
  176. /* File Map / Shared Memory Operations */
  177. #define __NR_mmap2 80
  178. __SYSCALL( 80, sys_mmap_pgoff, 6)
  179. #define __NR_munmap 81
  180. __SYSCALL( 81, sys_munmap, 2)
  181. #define __NR_mprotect 82
  182. __SYSCALL( 82, sys_mprotect, 3)
  183. #define __NR_brk 83
  184. __SYSCALL( 83, sys_brk, 1)
  185. #define __NR_mlock 84
  186. __SYSCALL( 84, sys_mlock, 2)
  187. #define __NR_munlock 85
  188. __SYSCALL( 85, sys_munlock, 2)
  189. #define __NR_mlockall 86
  190. __SYSCALL( 86, sys_mlockall, 1)
  191. #define __NR_munlockall 87
  192. __SYSCALL( 87, sys_munlockall, 0)
  193. #define __NR_mremap 88
  194. __SYSCALL( 88, sys_mremap, 4)
  195. #define __NR_msync 89
  196. __SYSCALL( 89, sys_msync, 3)
  197. #define __NR_mincore 90
  198. __SYSCALL( 90, sys_mincore, 3)
  199. #define __NR_madvise 91
  200. __SYSCALL( 91, sys_madvise, 3)
  201. #define __NR_shmget 92
  202. __SYSCALL( 92, sys_shmget, 4)
  203. #define __NR_shmat 93
  204. __SYSCALL( 93, xtensa_shmat, 4)
  205. #define __NR_shmctl 94
  206. __SYSCALL( 94, sys_shmctl, 4)
  207. #define __NR_shmdt 95
  208. __SYSCALL( 95, sys_shmdt, 4)
  209. /* Socket Operations */
  210. #define __NR_socket 96
  211. __SYSCALL( 96, sys_socket, 3)
  212. #define __NR_setsockopt 97
  213. __SYSCALL( 97, sys_setsockopt, 5)
  214. #define __NR_getsockopt 98
  215. __SYSCALL( 98, sys_getsockopt, 5)
  216. #define __NR_shutdown 99
  217. __SYSCALL( 99, sys_shutdown, 2)
  218. #define __NR_bind 100
  219. __SYSCALL(100, sys_bind, 3)
  220. #define __NR_connect 101
  221. __SYSCALL(101, sys_connect, 3)
  222. #define __NR_listen 102
  223. __SYSCALL(102, sys_listen, 2)
  224. #define __NR_accept 103
  225. __SYSCALL(103, sys_accept, 3)
  226. #define __NR_getsockname 104
  227. __SYSCALL(104, sys_getsockname, 3)
  228. #define __NR_getpeername 105
  229. __SYSCALL(105, sys_getpeername, 3)
  230. #define __NR_sendmsg 106
  231. __SYSCALL(106, sys_sendmsg, 3)
  232. #define __NR_recvmsg 107
  233. __SYSCALL(107, sys_recvmsg, 3)
  234. #define __NR_send 108
  235. __SYSCALL(108, sys_send, 4)
  236. #define __NR_recv 109
  237. __SYSCALL(109, sys_recv, 4)
  238. #define __NR_sendto 110
  239. __SYSCALL(110, sys_sendto, 6)
  240. #define __NR_recvfrom 111
  241. __SYSCALL(111, sys_recvfrom, 6)
  242. #define __NR_socketpair 112
  243. __SYSCALL(112, sys_socketpair, 4)
  244. #define __NR_sendfile 113
  245. __SYSCALL(113, sys_sendfile, 4)
  246. #define __NR_sendfile64 114
  247. __SYSCALL(114, sys_sendfile64, 4)
  248. #define __NR_available115 115
  249. __SYSCALL(115, sys_ni_syscall, 0)
  250. /* Process Operations */
  251. #define __NR_clone 116
  252. __SYSCALL(116, xtensa_clone, 5)
  253. #define __NR_execve 117
  254. __SYSCALL(117, xtensa_execve, 3)
  255. #define __NR_exit 118
  256. __SYSCALL(118, sys_exit, 1)
  257. #define __NR_exit_group 119
  258. __SYSCALL(119, sys_exit_group, 1)
  259. #define __NR_getpid 120
  260. __SYSCALL(120, sys_getpid, 0)
  261. #define __NR_wait4 121
  262. __SYSCALL(121, sys_wait4, 4)
  263. #define __NR_waitid 122
  264. __SYSCALL(122, sys_waitid, 5)
  265. #define __NR_kill 123
  266. __SYSCALL(123, sys_kill, 2)
  267. #define __NR_tkill 124
  268. __SYSCALL(124, sys_tkill, 2)
  269. #define __NR_tgkill 125
  270. __SYSCALL(125, sys_tgkill, 3)
  271. #define __NR_set_tid_address 126
  272. __SYSCALL(126, sys_set_tid_address, 1)
  273. #define __NR_gettid 127
  274. __SYSCALL(127, sys_gettid, 0)
  275. #define __NR_setsid 128
  276. __SYSCALL(128, sys_setsid, 0)
  277. #define __NR_getsid 129
  278. __SYSCALL(129, sys_getsid, 1)
  279. #define __NR_prctl 130
  280. __SYSCALL(130, sys_prctl, 5)
  281. #define __NR_personality 131
  282. __SYSCALL(131, sys_personality, 1)
  283. #define __NR_getpriority 132
  284. __SYSCALL(132, sys_getpriority, 2)
  285. #define __NR_setpriority 133
  286. __SYSCALL(133, sys_setpriority, 3)
  287. #define __NR_setitimer 134
  288. __SYSCALL(134, sys_setitimer, 3)
  289. #define __NR_getitimer 135
  290. __SYSCALL(135, sys_getitimer, 2)
  291. #define __NR_setuid 136
  292. __SYSCALL(136, sys_setuid, 1)
  293. #define __NR_getuid 137
  294. __SYSCALL(137, sys_getuid, 0)
  295. #define __NR_setgid 138
  296. __SYSCALL(138, sys_setgid, 1)
  297. #define __NR_getgid 139
  298. __SYSCALL(139, sys_getgid, 0)
  299. #define __NR_geteuid 140
  300. __SYSCALL(140, sys_geteuid, 0)
  301. #define __NR_getegid 141
  302. __SYSCALL(141, sys_getegid, 0)
  303. #define __NR_setreuid 142
  304. __SYSCALL(142, sys_setreuid, 2)
  305. #define __NR_setregid 143
  306. __SYSCALL(143, sys_setregid, 2)
  307. #define __NR_setresuid 144
  308. __SYSCALL(144, sys_setresuid, 3)
  309. #define __NR_getresuid 145
  310. __SYSCALL(145, sys_getresuid, 3)
  311. #define __NR_setresgid 146
  312. __SYSCALL(146, sys_setresgid, 3)
  313. #define __NR_getresgid 147
  314. __SYSCALL(147, sys_getresgid, 3)
  315. #define __NR_setpgid 148
  316. __SYSCALL(148, sys_setpgid, 2)
  317. #define __NR_getpgid 149
  318. __SYSCALL(149, sys_getpgid, 1)
  319. #define __NR_getppid 150
  320. __SYSCALL(150, sys_getppid, 0)
  321. #define __NR_getpgrp 151
  322. __SYSCALL(151, sys_getpgrp, 0)
  323. #define __NR_reserved152 152 /* set_thread_area */
  324. __SYSCALL(152, sys_ni_syscall, 0)
  325. #define __NR_reserved153 153 /* get_thread_area */
  326. __SYSCALL(153, sys_ni_syscall, 0)
  327. #define __NR_times 154
  328. __SYSCALL(154, sys_times, 1)
  329. #define __NR_acct 155
  330. __SYSCALL(155, sys_acct, 1)
  331. #define __NR_sched_setaffinity 156
  332. __SYSCALL(156, sys_sched_setaffinity, 3)
  333. #define __NR_sched_getaffinity 157
  334. __SYSCALL(157, sys_sched_getaffinity, 3)
  335. #define __NR_capget 158
  336. __SYSCALL(158, sys_capget, 2)
  337. #define __NR_capset 159
  338. __SYSCALL(159, sys_capset, 2)
  339. #define __NR_ptrace 160
  340. __SYSCALL(160, sys_ptrace, 4)
  341. #define __NR_semtimedop 161
  342. __SYSCALL(161, sys_semtimedop, 5)
  343. #define __NR_semget 162
  344. __SYSCALL(162, sys_semget, 4)
  345. #define __NR_semop 163
  346. __SYSCALL(163, sys_semop, 4)
  347. #define __NR_semctl 164
  348. __SYSCALL(164, sys_semctl, 4)
  349. #define __NR_available165 165
  350. __SYSCALL(165, sys_ni_syscall, 0)
  351. #define __NR_msgget 166
  352. __SYSCALL(166, sys_msgget, 4)
  353. #define __NR_msgsnd 167
  354. __SYSCALL(167, sys_msgsnd, 4)
  355. #define __NR_msgrcv 168
  356. __SYSCALL(168, sys_msgrcv, 4)
  357. #define __NR_msgctl 169
  358. __SYSCALL(169, sys_msgctl, 4)
  359. #define __NR_available170 170
  360. __SYSCALL(170, sys_ni_syscall, 0)
  361. #define __NR_available171 171
  362. __SYSCALL(171, sys_ni_syscall, 0)
  363. /* File System */
  364. #define __NR_mount 172
  365. __SYSCALL(172, sys_mount, 5)
  366. #define __NR_swapon 173
  367. __SYSCALL(173, sys_swapon, 2)
  368. #define __NR_chroot 174
  369. __SYSCALL(174, sys_chroot, 1)
  370. #define __NR_pivot_root 175
  371. __SYSCALL(175, sys_pivot_root, 2)
  372. #define __NR_umount 176
  373. __SYSCALL(176, sys_oldumount, 1)
  374. #define __ARCH_WANT_SYS_OLDUMOUNT
  375. #define __NR_swapoff 177
  376. __SYSCALL(177, sys_swapoff, 1)
  377. #define __NR_sync 178
  378. __SYSCALL(178, sys_sync, 0)
  379. #define __NR_available179 179
  380. __SYSCALL(179, sys_ni_syscall, 0)
  381. #define __NR_setfsuid 180
  382. __SYSCALL(180, sys_setfsuid, 1)
  383. #define __NR_setfsgid 181
  384. __SYSCALL(181, sys_setfsgid, 1)
  385. #define __NR_sysfs 182
  386. __SYSCALL(182, sys_sysfs, 3)
  387. #define __NR_ustat 183
  388. __SYSCALL(183, sys_ustat, 2)
  389. #define __NR_statfs 184
  390. __SYSCALL(184, sys_statfs, 2)
  391. #define __NR_fstatfs 185
  392. __SYSCALL(185, sys_fstatfs, 2)
  393. #define __NR_statfs64 186
  394. __SYSCALL(186, sys_statfs64, 3)
  395. #define __NR_fstatfs64 187
  396. __SYSCALL(187, sys_fstatfs64, 3)
  397. /* System */
  398. #define __NR_setrlimit 188
  399. __SYSCALL(188, sys_setrlimit, 2)
  400. #define __NR_getrlimit 189
  401. __SYSCALL(189, sys_getrlimit, 2)
  402. #define __NR_getrusage 190
  403. __SYSCALL(190, sys_getrusage, 2)
  404. #define __NR_futex 191
  405. __SYSCALL(191, sys_futex, 5)
  406. #define __NR_gettimeofday 192
  407. __SYSCALL(192, sys_gettimeofday, 2)
  408. #define __NR_settimeofday 193
  409. __SYSCALL(193, sys_settimeofday, 2)
  410. #define __NR_adjtimex 194
  411. __SYSCALL(194, sys_adjtimex, 1)
  412. #define __NR_nanosleep 195
  413. __SYSCALL(195, sys_nanosleep, 2)
  414. #define __NR_getgroups 196
  415. __SYSCALL(196, sys_getgroups, 2)
  416. #define __NR_setgroups 197
  417. __SYSCALL(197, sys_setgroups, 2)
  418. #define __NR_sethostname 198
  419. __SYSCALL(198, sys_sethostname, 2)
  420. #define __NR_setdomainname 199
  421. __SYSCALL(199, sys_setdomainname, 2)
  422. #define __NR_syslog 200
  423. __SYSCALL(200, sys_syslog, 3)
  424. #define __NR_vhangup 201
  425. __SYSCALL(201, sys_vhangup, 0)
  426. #define __NR_uselib 202
  427. __SYSCALL(202, sys_uselib, 1)
  428. #define __NR_reboot 203
  429. __SYSCALL(203, sys_reboot, 3)
  430. #define __NR_quotactl 204
  431. __SYSCALL(204, sys_quotactl, 4)
  432. #define __NR_nfsservctl 205
  433. __SYSCALL(205, sys_ni_syscall, 0)
  434. #define __NR__sysctl 206
  435. __SYSCALL(206, sys_sysctl, 1)
  436. #define __NR_bdflush 207
  437. __SYSCALL(207, sys_bdflush, 2)
  438. #define __NR_uname 208
  439. __SYSCALL(208, sys_newuname, 1)
  440. #define __NR_sysinfo 209
  441. __SYSCALL(209, sys_sysinfo, 1)
  442. #define __NR_init_module 210
  443. __SYSCALL(210, sys_init_module, 2)
  444. #define __NR_delete_module 211
  445. __SYSCALL(211, sys_delete_module, 1)
  446. #define __NR_sched_setparam 212
  447. __SYSCALL(212, sys_sched_setparam, 2)
  448. #define __NR_sched_getparam 213
  449. __SYSCALL(213, sys_sched_getparam, 2)
  450. #define __NR_sched_setscheduler 214
  451. __SYSCALL(214, sys_sched_setscheduler, 3)
  452. #define __NR_sched_getscheduler 215
  453. __SYSCALL(215, sys_sched_getscheduler, 1)
  454. #define __NR_sched_get_priority_max 216
  455. __SYSCALL(216, sys_sched_get_priority_max, 1)
  456. #define __NR_sched_get_priority_min 217
  457. __SYSCALL(217, sys_sched_get_priority_min, 1)
  458. #define __NR_sched_rr_get_interval 218
  459. __SYSCALL(218, sys_sched_rr_get_interval, 2)
  460. #define __NR_sched_yield 219
  461. __SYSCALL(219, sys_sched_yield, 0)
  462. #define __NR_available222 222
  463. __SYSCALL(222, sys_ni_syscall, 0)
  464. /* Signal Handling */
  465. #define __NR_restart_syscall 223
  466. __SYSCALL(223, sys_restart_syscall, 0)
  467. #define __NR_sigaltstack 224
  468. __SYSCALL(224, xtensa_sigaltstack, 2)
  469. #define __NR_rt_sigreturn 225
  470. __SYSCALL(225, xtensa_rt_sigreturn, 1)
  471. #define __NR_rt_sigaction 226
  472. __SYSCALL(226, sys_rt_sigaction, 4)
  473. #define __NR_rt_sigprocmask 227
  474. __SYSCALL(227, sys_rt_sigprocmask, 4)
  475. #define __NR_rt_sigpending 228
  476. __SYSCALL(228, sys_rt_sigpending, 2)
  477. #define __NR_rt_sigtimedwait 229
  478. __SYSCALL(229, sys_rt_sigtimedwait, 4)
  479. #define __NR_rt_sigqueueinfo 230
  480. __SYSCALL(230, sys_rt_sigqueueinfo, 3)
  481. #define __NR_rt_sigsuspend 231
  482. __SYSCALL(231, xtensa_rt_sigsuspend, 2)
  483. /* Message */
  484. #define __NR_mq_open 232
  485. __SYSCALL(232, sys_mq_open, 4)
  486. #define __NR_mq_unlink 233
  487. __SYSCALL(233, sys_mq_unlink, 1)
  488. #define __NR_mq_timedsend 234
  489. __SYSCALL(234, sys_mq_timedsend, 5)
  490. #define __NR_mq_timedreceive 235
  491. __SYSCALL(235, sys_mq_timedreceive, 5)
  492. #define __NR_mq_notify 236
  493. __SYSCALL(236, sys_mq_notify, 2)
  494. #define __NR_mq_getsetattr 237
  495. __SYSCALL(237, sys_mq_getsetattr, 3)
  496. #define __NR_available238 238
  497. __SYSCALL(238, sys_ni_syscall, 0)
  498. /* IO */
  499. #define __NR_io_setup 239
  500. __SYSCALL(239, sys_io_setup, 2)
  501. #define __NR_io_destroy 240
  502. __SYSCALL(240, sys_io_destroy, 1)
  503. #define __NR_io_submit 241
  504. __SYSCALL(241, sys_io_submit, 3)
  505. #define __NR_io_getevents 242
  506. __SYSCALL(242, sys_io_getevents, 5)
  507. #define __NR_io_cancel 243
  508. __SYSCALL(243, sys_io_cancel, 3)
  509. #define __NR_clock_settime 244
  510. __SYSCALL(244, sys_clock_settime, 2)
  511. #define __NR_clock_gettime 245
  512. __SYSCALL(245, sys_clock_gettime, 2)
  513. #define __NR_clock_getres 246
  514. __SYSCALL(246, sys_clock_getres, 2)
  515. #define __NR_clock_nanosleep 247
  516. __SYSCALL(247, sys_clock_nanosleep, 4)
  517. /* Timer */
  518. #define __NR_timer_create 248
  519. __SYSCALL(248, sys_timer_create, 3)
  520. #define __NR_timer_delete 249
  521. __SYSCALL(249, sys_timer_delete, 1)
  522. #define __NR_timer_settime 250
  523. __SYSCALL(250, sys_timer_settime, 4)
  524. #define __NR_timer_gettime 251
  525. __SYSCALL(251, sys_timer_gettime, 2)
  526. #define __NR_timer_getoverrun 252
  527. __SYSCALL(252, sys_timer_getoverrun, 1)
  528. /* System */
  529. #define __NR_reserved244 253
  530. __SYSCALL(253, sys_ni_syscall, 0)
  531. #define __NR_lookup_dcookie 254
  532. __SYSCALL(254, sys_lookup_dcookie, 4)
  533. #define __NR_available255 255
  534. __SYSCALL(255, sys_ni_syscall, 0)
  535. #define __NR_add_key 256
  536. __SYSCALL(256, sys_add_key, 5)
  537. #define __NR_request_key 257
  538. __SYSCALL(257, sys_request_key, 5)
  539. #define __NR_keyctl 258
  540. __SYSCALL(258, sys_keyctl, 5)
  541. #define __NR_available259 259
  542. __SYSCALL(259, sys_ni_syscall, 0)
  543. #define __NR_readahead 260
  544. __SYSCALL(260, sys_readahead, 5)
  545. #define __NR_remap_file_pages 261
  546. __SYSCALL(261, sys_remap_file_pages, 5)
  547. #define __NR_migrate_pages 262
  548. __SYSCALL(262, sys_migrate_pages, 0)
  549. #define __NR_mbind 263
  550. __SYSCALL(263, sys_mbind, 6)
  551. #define __NR_get_mempolicy 264
  552. __SYSCALL(264, sys_get_mempolicy, 5)
  553. #define __NR_set_mempolicy 265
  554. __SYSCALL(265, sys_set_mempolicy, 3)
  555. #define __NR_unshare 266
  556. __SYSCALL(266, sys_unshare, 1)
  557. #define __NR_move_pages 267
  558. __SYSCALL(267, sys_move_pages, 0)
  559. #define __NR_splice 268
  560. __SYSCALL(268, sys_splice, 0)
  561. #define __NR_tee 269
  562. __SYSCALL(269, sys_tee, 0)
  563. #define __NR_vmsplice 270
  564. __SYSCALL(270, sys_vmsplice, 0)
  565. #define __NR_available271 271
  566. __SYSCALL(271, sys_ni_syscall, 0)
  567. #define __NR_pselect6 272
  568. __SYSCALL(272, sys_pselect6, 0)
  569. #define __NR_ppoll 273
  570. __SYSCALL(273, sys_ppoll, 0)
  571. #define __NR_epoll_pwait 274
  572. __SYSCALL(274, sys_epoll_pwait, 0)
  573. #define __NR_available275 275
  574. __SYSCALL(275, sys_ni_syscall, 0)
  575. #define __NR_inotify_init 276
  576. __SYSCALL(276, sys_inotify_init, 0)
  577. #define __NR_inotify_add_watch 277
  578. __SYSCALL(277, sys_inotify_add_watch, 3)
  579. #define __NR_inotify_rm_watch 278
  580. __SYSCALL(278, sys_inotify_rm_watch, 2)
  581. #define __NR_available279 279
  582. __SYSCALL(279, sys_ni_syscall, 0)
  583. #define __NR_getcpu 280
  584. __SYSCALL(280, sys_getcpu, 0)
  585. #define __NR_kexec_load 281
  586. __SYSCALL(281, sys_ni_syscall, 0)
  587. #define __NR_ioprio_set 282
  588. __SYSCALL(282, sys_ioprio_set, 2)
  589. #define __NR_ioprio_get 283
  590. __SYSCALL(283, sys_ioprio_get, 3)
  591. #define __NR_set_robust_list 284
  592. __SYSCALL(284, sys_set_robust_list, 3)
  593. #define __NR_get_robust_list 285
  594. __SYSCALL(285, sys_get_robust_list, 3)
  595. #define __NR_reserved286 286 /* sync_file_rangeX */
  596. __SYSCALL(286, sys_ni_syscall, 3)
  597. #define __NR_available287 287
  598. __SYSCALL(287, sys_faccessat, 0)
  599. /* Relative File Operations */
  600. #define __NR_openat 288
  601. __SYSCALL(288, sys_openat, 4)
  602. #define __NR_mkdirat 289
  603. __SYSCALL(289, sys_mkdirat, 3)
  604. #define __NR_mknodat 290
  605. __SYSCALL(290, sys_mknodat, 4)
  606. #define __NR_unlinkat 291
  607. __SYSCALL(291, sys_unlinkat, 3)
  608. #define __NR_renameat 292
  609. __SYSCALL(292, sys_renameat, 4)
  610. #define __NR_linkat 293
  611. __SYSCALL(293, sys_linkat, 5)
  612. #define __NR_symlinkat 294
  613. __SYSCALL(294, sys_symlinkat, 3)
  614. #define __NR_readlinkat 295
  615. __SYSCALL(295, sys_readlinkat, 4)
  616. #define __NR_utimensat 296
  617. __SYSCALL(296, sys_utimensat, 0)
  618. #define __NR_fchownat 297
  619. __SYSCALL(297, sys_fchownat, 5)
  620. #define __NR_futimesat 298
  621. __SYSCALL(298, sys_futimesat, 4)
  622. #define __NR_fstatat64 299
  623. __SYSCALL(299, sys_fstatat64, 0)
  624. #define __NR_fchmodat 300
  625. __SYSCALL(300, sys_fchmodat, 4)
  626. #define __NR_faccessat 301
  627. __SYSCALL(301, sys_faccessat, 4)
  628. #define __NR_available302 302
  629. __SYSCALL(302, sys_ni_syscall, 0)
  630. #define __NR_available303 303
  631. __SYSCALL(303, sys_ni_syscall, 0)
  632. #define __NR_signalfd 304
  633. __SYSCALL(304, sys_signalfd, 3)
  634. /* 305 was __NR_timerfd */
  635. __SYSCALL(305, sys_ni_syscall, 0)
  636. #define __NR_eventfd 306
  637. __SYSCALL(306, sys_eventfd, 1)
  638. #define __NR_recvmmsg 307
  639. __SYSCALL(307, sys_recvmmsg, 5)
  640. #define __NR_setns 308
  641. __SYSCALL(308, sys_setns, 2)
  642. #define __NR_syscall_count 309
  643. /*
  644. * sysxtensa syscall handler
  645. *
  646. * int sysxtensa (SYS_XTENSA_ATOMIC_SET, ptr, val, unused);
  647. * int sysxtensa (SYS_XTENSA_ATOMIC_ADD, ptr, val, unused);
  648. * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val, unused);
  649. * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval);
  650. * a2 a6 a3 a4 a5
  651. */
  652. #define SYS_XTENSA_RESERVED 0 /* don't use this */
  653. #define SYS_XTENSA_ATOMIC_SET 1 /* set variable */
  654. #define SYS_XTENSA_ATOMIC_EXG_ADD 2 /* exchange memory and add */
  655. #define SYS_XTENSA_ATOMIC_ADD 3 /* add to memory */
  656. #define SYS_XTENSA_ATOMIC_CMP_SWP 4 /* compare and swap */
  657. #define SYS_XTENSA_COUNT 5 /* count */
  658. #ifdef __KERNEL__
  659. /*
  660. * "Conditional" syscalls
  661. *
  662. * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  663. * but it doesn't work on all toolchains, so we just do it by hand
  664. */
  665. #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
  666. #define __ARCH_WANT_STAT64
  667. #define __ARCH_WANT_SYS_UTIME
  668. #define __ARCH_WANT_SYS_LLSEEK
  669. #define __ARCH_WANT_SYS_RT_SIGACTION
  670. #define __ARCH_WANT_SYS_RT_SIGSUSPEND
  671. #define __ARCH_WANT_SYS_GETPGRP
  672. /*
  673. * Ignore legacy system calls in the checksyscalls.sh script
  674. */
  675. #define __IGNORE_fork /* use clone */
  676. #define __IGNORE_time
  677. #define __IGNORE_alarm /* use setitimer */
  678. #define __IGNORE_pause
  679. #define __IGNORE_mmap /* use mmap2 */
  680. #define __IGNORE_vfork /* use clone */
  681. #define __IGNORE_fadvise64 /* use fadvise64_64 */
  682. #endif /* __KERNEL__ */
  683. #endif /* _XTENSA_UNISTD_H */