blob: df2310d9911e1ea50706e59e5e0bdcacd34e8b8d [file] [log] [blame]
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001/*
2 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
3 * Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
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.
16 *
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.
27 *
28 * $Id$
29 */
30
31#include "dummy.h"
32
33/* primary syscalls */
34
35int sys_setup(), sys_exit(), sys_fork(), sys_read(), sys_write();
36int sys_open(), sys_close(), sys_waitpid(), sys_creat(), sys_link();
37int sys_unlink(), sys_execve(), sys_chdir(), sys_time(), sys_mknod();
38int sys_chmod(), sys_chown(), sys_break(), sys_oldstat();
Wichert Akkermandacfb6e1999-06-03 14:21:07 +000039int sys_lseek(), sys_getpid(), sys_mount(), sys_umount(), sys_umount2();
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000040int sys_setuid(), sys_getuid(), sys_stime(), sys_ptrace();
41int sys_alarm(), sys_oldfstat(), sys_pause(), sys_utime();
42int sys_stty(), sys_gtty(), sys_access(), sys_nice(), sys_ftime();
43int sys_sync(), sys_kill(), sys_rename(), sys_mkdir(), sys_rmdir();
44int sys_dup(), sys_pipe(), sys_times(), sys_prof(), sys_brk();
45int sys_setgid(), sys_getgid(), sys_signal(), sys_geteuid();
46int sys_getegid(), sys_acct(), sys_phys(), sys_lock(), sys_ioctl();
47int sys_fcntl(), sys_mpx(), sys_setpgid(), sys_ulimit();
48int sys_olduname(), sys_umask(), sys_chroot(), sys_ustat();
49int sys_dup2(), sys_getppid(), sys_getpgrp(), sys_setsid();
50int sys_sigaction(), sys_siggetmask(), sys_sigsetmask();
51int sys_setreuid(), sys_setregid(), sys_sigsuspend();
52int sys_sigpending(), sys_sethostname(), sys_setrlimit();
53int sys_getrlimit(), sys_getrusage(), sys_gettimeofday();
54int sys_settimeofday(), sys_getgroups(), sys_setgroups();
55int sys_oldselect(), sys_symlink(), sys_oldlstat(), sys_readlink();
56int sys_uselib(), sys_swapon(), sys_reboot(), sys_readdir();
57int sys_mmap(), sys_munmap(), sys_truncate(), sys_ftruncate();
58int sys_fchmod(), sys_fchown(), sys_getpriority();
59int sys_setpriority(), sys_profil(), sys_statfs(), sys_fstatfs();
60int sys_ioperm(), sys_socketcall(), sys_syslog(), sys_setitimer();
61int sys_getitimer(), sys_stat(), sys_lstat(), sys_fstat();
62int sys_uname(), sys_iopl(), sys_vhangup(), sys_idle(), sys_vm86();
63int sys_wait4(), sys_swapoff(), sys_ipc(), sys_sigreturn();
64int sys_fsync(), sys_clone(), sys_setdomainname(), sys_sysinfo();
65int sys_modify_ldt(), sys_adjtimex(), sys_mprotect();
66int sys_sigprocmask(), sys_create_module(), sys_init_module();
67int sys_delete_module(), sys_get_kernel_syms(), sys_quotactl();
68int sys_getpgid(), sys_fchdir(), sys_bdflush();
69int sys_sysfs(), sys_personality(), sys_afs_syscall();
70int sys_setfsuid(), sys_setfsgid(), sys_llseek();
71int sys_getdents(), sys_flock(), sys_msync();
72int sys_readv(), sys_writev(), sys_select();
73int sys_getsid(), sys_fdatasync(), sys_sysctl();
Wichert Akkermanc7926982000-04-10 22:22:31 +000074int sys_mlock(), sys_munlock(), sys_mlockall(), sys_munlockall(), sys_madvise();
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000075int sys_sched_setparam(), sys_sched_getparam();
76int sys_sched_setscheduler(), sys_sched_getscheduler(), sys_sched_yield();
77int sys_sched_get_priority_max(), sys_sched_get_priority_min();
78int sys_sched_rr_get_interval(), sys_nanosleep(), sys_mremap();
79int sys_sendmsg(), sys_recvmsg(), sys_setresuid(), sys_setresgid();
80int sys_getresuid(), sys_getresgid(), sys_pread(), sys_pwrite(), sys_getcwd();
81int sys_sigaltstack(), sys_rt_sigprocmask(), sys_rt_sigaction();
82int sys_rt_sigpending(), sys_rt_sigsuspend(), sys_rt_sigqueueinfo();
83int sys_rt_sigtimedwait(), sys_prctl(), sys_poll(), sys_vfork();
Ulrich Drepper75bb37c1999-12-24 07:59:50 +000084int sys_sendfile(), sys_old_mmap(), sys_stat64(), sys_lstat64(), sys_fstat64();
Wichert Akkermanc7926982000-04-10 22:22:31 +000085int sys_truncate64(), sys_ftruncate64(), sys_pivotroot();
Roland McGrath9677b3a2003-03-12 09:54:36 +000086int sys_getdents64();
Roland McGrath2c71e0d2002-12-15 23:58:19 +000087int sys_getpmsg(), sys_putpmsg(), sys_readahead(), sys_sendfile64();
88int sys_setxattr(), sys_fsetxattr(), sys_getxattr(), sys_fgetxattr();
89int sys_listxattr(), sys_flistxattr(), sys_removexattr(), sys_fremovexattr();
90int sys_sched_setaffinity(), sys_sched_getaffinity(), sys_futex();
Roland McGrath72c5b7b2003-03-05 04:08:00 +000091int sys_set_thread_area(), sys_get_thread_area(), sys_remap_file_pages();
Roland McGrath1e356792003-03-30 23:52:28 +000092int sys_timer_create(), sys_timer_delete(), sys_timer_getoverrun();
93int sys_timer_gettime(), sys_timer_settime(), sys_clock_settime();
94int sys_clock_gettime(), sys_clock_getres(), sys_clock_nanosleep();
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000095
96
97/* sys_socketcall subcalls */
98
99int sys_socket(), sys_bind(), sys_connect(), sys_listen();
100int sys_accept(), sys_getsockname(), sys_getpeername(), sys_socketpair();
101int sys_send(), sys_recv(), sys_sendto(), sys_recvfrom();
102int sys_shutdown(), sys_setsockopt(), sys_getsockopt();
103
104/* new ones */
105int sys_query_module();
106int sys_poll();
Michal Ludvig10a88d02002-10-07 14:31:00 +0000107int sys_mincore();
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000108
Wichert Akkerman0ae852b1999-11-18 17:12:55 +0000109/* architecture-specific calls */
110#ifdef ALPHA
Wichert Akkerman221f54f1999-11-18 17:26:45 +0000111int sys_osf_select();
112int sys_osf_gettimeofday();
113int sys_osf_settimeofday();
114int sys_osf_getitimer();
115int sys_osf_setitimer();
116int sys_osf_getrusage();
117int sys_osf_wait4();
118int sys_osf_utimes();
Wichert Akkerman0ae852b1999-11-18 17:12:55 +0000119#endif
120
121
Michal Ludvig0e035502002-09-23 15:41:01 +0000122#if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && !defined(X86_64)
Wichert Akkerman7b3346b2001-10-09 23:47:38 +0000123# ifdef IA64
124/*
125 * IA64 syscall numbers (the only ones available from standard header
126 * files) are disjoint from IA32 syscall numbers. We need to define
127 * the IA32 socket call number here.
128 */
129# define SYS_socketcall 102
130
131# undef SYS_socket
132# undef SYS_bind
133# undef SYS_connect
134# undef SYS_listen
135# undef SYS_accept
136# undef SYS_getsockname
137# undef SYS_getpeername
138# undef SYS_socketpair
139# undef SYS_send
140# undef SYS_recv
141# undef SYS_sendto
142# undef SYS_recvfrom
143# undef SYS_shutdown
144# undef SYS_setsockopt
145# undef SYS_getsockopt
146# undef SYS_sendmsg
147# undef SYS_recvmsg
Roland McGrath09f0d1d2002-12-22 03:34:39 +0000148# endif /* IA64 */
Roland McGrath3f01abd2003-01-18 00:19:28 +0000149# if defined S390 || defined S390X || defined POWERPC
Roland McGrath09f0d1d2002-12-22 03:34:39 +0000150# define SYS_socket_subcall 256
Roland McGrathbc783762003-01-14 23:40:52 +0000151# else
152# define SYS_socket_subcall 300
Roland McGrath09f0d1d2002-12-22 03:34:39 +0000153# endif
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000154#define SYS_socket (SYS_socket_subcall + 1)
155#define SYS_bind (SYS_socket_subcall + 2)
156#define SYS_connect (SYS_socket_subcall + 3)
157#define SYS_listen (SYS_socket_subcall + 4)
158#define SYS_accept (SYS_socket_subcall + 5)
159#define SYS_getsockname (SYS_socket_subcall + 6)
160#define SYS_getpeername (SYS_socket_subcall + 7)
161#define SYS_socketpair (SYS_socket_subcall + 8)
162#define SYS_send (SYS_socket_subcall + 9)
163#define SYS_recv (SYS_socket_subcall + 10)
164#define SYS_sendto (SYS_socket_subcall + 11)
165#define SYS_recvfrom (SYS_socket_subcall + 12)
166#define SYS_shutdown (SYS_socket_subcall + 13)
167#define SYS_setsockopt (SYS_socket_subcall + 14)
168#define SYS_getsockopt (SYS_socket_subcall + 15)
Wichert Akkerman0ae852b1999-11-18 17:12:55 +0000169#define SYS_sendmsg (SYS_socket_subcall + 16)
170#define SYS_recvmsg (SYS_socket_subcall + 17)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000171
Wichert Akkerman0ae852b1999-11-18 17:12:55 +0000172#define SYS_socket_nsubcalls 18
Michal Ludvig0e035502002-09-23 15:41:01 +0000173#endif /* !(ALPHA || MIPS || HPPA || X86_64) */
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000174
175/* sys_ipc subcalls */
176
Wichert Akkermane5be0de1999-12-14 10:46:18 +0000177int sys_semget(), sys_semctl(), sys_semop();
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000178int sys_msgsnd(), sys_msgrcv(), sys_msgget(), sys_msgctl();
179int sys_shmat(), sys_shmdt(), sys_shmget(), sys_shmctl();
180
Michal Ludvig0e035502002-09-23 15:41:01 +0000181#if !defined(ALPHA) && !defined(MIPS) && !defined(SPARC) && !defined(HPPA) && !defined(X86_64)
Wichert Akkerman7b3346b2001-10-09 23:47:38 +0000182# ifdef IA64
183 /*
184 * IA64 syscall numbers (the only ones available from standard
185 * header files) are disjoint from IA32 syscall numbers. We need
186 * to define the IA32 socket call number here. Fortunately, this
187 * symbol, `SYS_ipc', is not used by any of the IA64 code so
188 * re-defining this symbol will not cause a problem.
189 */
190# undef SYS_ipc
191# define SYS_ipc 117
192# undef SYS_semop
193# undef SYS_semget
194# undef SYS_semctl
195# undef SYS_msgsnd
196# undef SYS_msgrcv
197# undef SYS_msgget
198# undef SYS_msgctl
199# undef SYS_shmat
200# undef SYS_shmdt
201# undef SYS_shmget
202# undef SYS_shmctl
203# endif /* IA64 */
Roland McGrath2c71e0d2002-12-15 23:58:19 +0000204#define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000205#define SYS_semop (SYS_ipc_subcall + 1)
206#define SYS_semget (SYS_ipc_subcall + 2)
207#define SYS_semctl (SYS_ipc_subcall + 3)
208#define SYS_msgsnd (SYS_ipc_subcall + 11)
209#define SYS_msgrcv (SYS_ipc_subcall + 12)
210#define SYS_msgget (SYS_ipc_subcall + 13)
211#define SYS_msgctl (SYS_ipc_subcall + 14)
212#define SYS_shmat (SYS_ipc_subcall + 21)
213#define SYS_shmdt (SYS_ipc_subcall + 22)
214#define SYS_shmget (SYS_ipc_subcall + 23)
215#define SYS_shmctl (SYS_ipc_subcall + 24)
216
217#define SYS_ipc_nsubcalls 25
Michal Ludvig0e035502002-09-23 15:41:01 +0000218#endif /* !(ALPHA || MIPS || SPARC || HPPA || X86_64) */
Wichert Akkerman7b3346b2001-10-09 23:47:38 +0000219
220#ifdef IA64
221 /*
222 * IA64 syscall numbers (the only ones available from standard header
223 * files) are disjoint from IA32 syscall numbers. We need to define
224 * some IA32 specific syscalls here.
225 */
226# define SYS_fork 2
227# define SYS_vfork 190
228# define SYS32_exit 1
229# define SYS_waitpid 7
230# define SYS32_wait4 114
231# define SYS32_execve 11
232#endif /* IA64 */
Wichert Akkerman8b1b40c2000-02-03 21:58:30 +0000233
234#if defined(ALPHA) || defined(IA64)
235int sys_getpagesize();
236#endif
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000237
238#ifdef ALPHA
Wichert Akkermanc7926982000-04-10 22:22:31 +0000239int osf_statfs(), osf_fstatfs();
Wichert Akkerman8b1b40c2000-02-03 21:58:30 +0000240#endif
241
242#ifdef IA64
243int sys_getpmsg(), sys_putpmsg(); /* STREAMS stuff */
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000244#endif
245
Wichert Akkerman0cbfb322001-02-19 13:35:53 +0000246#ifdef MIPS
Wichert Akkermand6b92492001-04-07 21:37:12 +0000247int sys_sysmips();
Wichert Akkerman0cbfb322001-02-19 13:35:53 +0000248#endif
249
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000250int sys_setpgrp(), sys_gethostname(), sys_getdtablesize(), sys_utimes();
251int sys_capget(), sys_capset();
252
Wichert Akkerman2e2553a1999-05-09 00:29:58 +0000253#ifdef M68K
254int sys_cacheflush();
255#endif