2 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
3 * Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48 int sys_clock_gettime();
49 int sys_clock_nanosleep();
50 int sys_clock_settime();
55 int sys_create_module();
58 int sys_epoll_create();
59 int sys_epoll_create1();
61 int sys_epoll_pwait();
69 int sys_fadvise64_64();
80 int sys_fremovexattr();
88 int sys_ftruncate64();
91 int sys_get_mempolicy();
92 int sys_get_thread_area();
97 int sys_getdtablesize();
99 int sys_getgroups32();
100 int sys_gethostname();
102 int sys_getpeername();
104 int sys_getpriority();
110 int sys_getsockname();
111 int sys_getsockopt();
112 int sys_gettimeofday();
115 int sys_init_module();
116 int sys_inotify_add_watch();
117 int sys_inotify_init1();
118 int sys_inotify_rm_watch();
120 int sys_io_destroy();
121 int sys_io_getevents();
143 int sys_modify_ldt();
145 int sys_move_pages();
147 int sys_mq_getsetattr();
150 int sys_mq_timedreceive();
151 int sys_mq_timedsend();
160 int sys_newfstatat();
169 int sys_personality();
185 int sys_query_module();
191 int sys_readlinkat();
198 int sys_remap_file_pages();
199 int sys_removexattr();
201 int sys_restart_syscall();
202 int sys_rt_sigaction();
203 int sys_rt_sigpending();
204 int sys_rt_sigprocmask();
205 int sys_rt_sigqueueinfo();
206 int sys_rt_sigsuspend();
207 int sys_rt_sigtimedwait();
208 int sys_sched_get_priority_min();
209 int sys_sched_getaffinity();
210 int sys_sched_getparam();
211 int sys_sched_getscheduler();
212 int sys_sched_setaffinity();
213 int sys_sched_setparam();
214 int sys_sched_setscheduler();
219 int sys_semtimedop();
222 int sys_sendfile64();
225 int sys_set_mempolicy();
226 int sys_set_thread_area();
227 int sys_setdomainname();
231 int sys_setgroups32();
232 int sys_sethostname();
236 int sys_setpriority();
242 int sys_setsockopt();
243 int sys_settimeofday();
252 int sys_sigaltstack();
253 int sys_siggetmask();
257 int sys_sigpending();
258 int sys_sigprocmask();
260 int sys_sigsetmask();
261 int sys_sigsuspend();
263 int sys_socketpair();
277 int sys_timer_create();
278 int sys_timer_gettime();
279 int sys_timer_settime();
281 int sys_timerfd_create();
282 int sys_timerfd_gettime();
283 int sys_timerfd_settime();
286 int sys_truncate64();
303 /* architecture-specific calls */
307 int sys_osf_getitimer();
308 int sys_osf_getrusage();
309 int sys_osf_gettimeofday();
310 int sys_osf_select();
311 int sys_osf_setitimer();
312 int sys_osf_settimeofday();
313 int sys_osf_utimes();
319 # define SYS_waitid 284
321 # define SYS_waitid 438
323 # define SYS_waitid (NR_SYSCALL_BASE + 280)
325 # define SYS_waitid 1270
327 # define SYS_waitid 277
328 # elif defined POWERPC
329 # define SYS_waitid 272
330 # elif defined S390 || defined S390X
331 # define SYS_waitid 281
333 # define SYS_waitid 312
335 # define SYS_waitid 312
337 # define SYS_waitid 284
338 # elif defined SPARC || defined SPARC64
339 # define SYS_waitid 279
340 # elif defined X86_64
341 # define SYS_waitid 247
345 #if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
346 !defined(__ARM_EABI__)
349 * IA64 syscall numbers (the only ones available from standard header
350 * files) are disjoint from IA32 syscall numbers. We need to define
351 * the IA32 socket call number here.
353 # define SYS_socketcall 102
360 # undef SYS_getsockname
361 # undef SYS_getpeername
362 # undef SYS_socketpair
368 # undef SYS_setsockopt
369 # undef SYS_getsockopt
373 # if defined(SPARC) || defined(SPARC64)
374 # define SYS_socket_subcall 353
376 # define SYS_socket_subcall 400
378 #define SYS_sub_socket (SYS_socket_subcall + 1)
379 #define SYS_sub_bind (SYS_socket_subcall + 2)
380 #define SYS_sub_connect (SYS_socket_subcall + 3)
381 #define SYS_sub_listen (SYS_socket_subcall + 4)
382 #define SYS_sub_accept (SYS_socket_subcall + 5)
383 #define SYS_sub_getsockname (SYS_socket_subcall + 6)
384 #define SYS_sub_getpeername (SYS_socket_subcall + 7)
385 #define SYS_sub_socketpair (SYS_socket_subcall + 8)
386 #define SYS_sub_send (SYS_socket_subcall + 9)
387 #define SYS_sub_recv (SYS_socket_subcall + 10)
388 #define SYS_sub_sendto (SYS_socket_subcall + 11)
389 #define SYS_sub_recvfrom (SYS_socket_subcall + 12)
390 #define SYS_sub_shutdown (SYS_socket_subcall + 13)
391 #define SYS_sub_setsockopt (SYS_socket_subcall + 14)
392 #define SYS_sub_getsockopt (SYS_socket_subcall + 15)
393 #define SYS_sub_sendmsg (SYS_socket_subcall + 16)
394 #define SYS_sub_recvmsg (SYS_socket_subcall + 17)
395 #define SYS_sub_accept4 (SYS_socket_subcall + 18)
396 #define SYS_sub_recvmmsg (SYS_socket_subcall + 19)
398 #define SYS_socket_nsubcalls 20
399 #endif /* !(ALPHA || MIPS || HPPA) */
401 #if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
402 !defined(__ARM_EABI__)
405 * IA64 syscall numbers (the only ones available from standard
406 * header files) are disjoint from IA32 syscall numbers. We need
407 * to define the IA32 socket call number here. Fortunately, this
408 * symbol, `SYS_ipc', is not used by any of the IA64 code so
409 * re-defining this symbol will not cause a problem.
416 # undef SYS_semtimedop
426 #define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
427 #define SYS_sub_semop (SYS_ipc_subcall + 1)
428 #define SYS_sub_semget (SYS_ipc_subcall + 2)
429 #define SYS_sub_semctl (SYS_ipc_subcall + 3)
430 #define SYS_sub_semtimedop (SYS_ipc_subcall + 4)
431 #define SYS_sub_msgsnd (SYS_ipc_subcall + 11)
432 #define SYS_sub_msgrcv (SYS_ipc_subcall + 12)
433 #define SYS_sub_msgget (SYS_ipc_subcall + 13)
434 #define SYS_sub_msgctl (SYS_ipc_subcall + 14)
435 #define SYS_sub_shmat (SYS_ipc_subcall + 21)
436 #define SYS_sub_shmdt (SYS_ipc_subcall + 22)
437 #define SYS_sub_shmget (SYS_ipc_subcall + 23)
438 #define SYS_sub_shmctl (SYS_ipc_subcall + 24)
440 #define SYS_ipc_nsubcalls 25
441 #endif /* !(ALPHA || MIPS || HPPA) */
443 #if defined SYS_ipc_subcall && !defined SYS_ipc
444 # define SYS_ipc SYS_ipc_subcall
446 #if defined SYS_socket_subcall && !defined SYS_socketcall
447 # define SYS_socketcall SYS_socket_subcall
452 * IA64 syscall numbers (the only ones available from standard header
453 * files) are disjoint from IA32 syscall numbers. We need to define
454 * some IA32 specific syscalls here.
457 # define SYS_vfork 190
458 # define SYS32_exit 1
459 # define SYS_waitpid 7
460 # define SYS32_wait4 114
461 # define SYS32_execve 11
464 #if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
465 int sys_getpagesize();
478 #if defined M68K || defined SH
479 int sys_cacheflush();
483 int sys_subpage_prot();
487 int sys_cacheflush();
488 int sys_sram_alloc();
491 #if defined SPARC || defined SPARC64
492 #include "sparc/syscall1.h"
499 #define SYS_semsys_subcall 200
500 #define SYS_semsys_nsubcalls 3
501 #define SYS_semctl (SYS_semsys_subcall + 0)
502 #define SYS_semget (SYS_semsys_subcall + 1)
503 #define SYS_semop (SYS_semsys_subcall + 2)
504 #define SYS_msgsys_subcall 203
505 #define SYS_msgsys_nsubcalls 4
506 #define SYS_msgget (SYS_msgsys_subcall + 0)
507 #define SYS_msgctl (SYS_msgsys_subcall + 1)
508 #define SYS_msgrcv (SYS_msgsys_subcall + 2)
509 #define SYS_msgsnd (SYS_msgsys_subcall + 3)
510 #define SYS_shmsys_subcall 207
511 #define SYS_shmsys_nsubcalls 4
512 #define SYS_shmat (SYS_shmsys_subcall + 0)
513 #define SYS_shmctl (SYS_shmsys_subcall + 1)
514 #define SYS_shmdt (SYS_shmsys_subcall + 2)
515 #define SYS_shmget (SYS_shmsys_subcall + 3)