blob: 4eb7368b1ce0f8a9a8a7736a05e88131e079f017 [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
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000033/* common syscalls */
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000034
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000035int sys_accept();
36int sys_accept4();
37int sys_access();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000038int sys_adjtimex();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000039int sys_arch_prctl();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000040int sys_bind();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000041int sys_brk();
42int sys_capget();
43int sys_capset();
Dmitry V. Levindd760852011-11-28 23:25:13 +000044int sys_chdir();
Dmitry V. Levindd760852011-11-28 23:25:13 +000045int sys_chmod();
46int sys_chown();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000047int sys_clock_gettime();
48int sys_clock_nanosleep();
49int sys_clock_settime();
50int sys_clone();
51int sys_close();
52int sys_connect();
53int sys_creat();
54int sys_create_module();
Dmitry V. Levindd760852011-11-28 23:25:13 +000055int sys_dup2();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000056int sys_dup3();
57int sys_epoll_create();
58int sys_epoll_create1();
59int sys_epoll_ctl();
60int sys_epoll_pwait();
61int sys_epoll_wait();
62int sys_eventfd();
63int sys_eventfd2();
64int sys_execve();
65int sys_exit();
66int sys_faccessat();
67int sys_fadvise64();
68int sys_fadvise64_64();
69int sys_fallocate();
70int sys_fchmod();
71int sys_fchmodat();
72int sys_fchown();
73int sys_fchownat();
74int sys_fcntl();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000075int sys_fgetxattr();
76int sys_flistxattr();
77int sys_flock();
78int sys_fork();
79int sys_fremovexattr();
80int sys_fsetxattr();
81int sys_fstat();
82int sys_fstat64();
83int sys_fstatfs();
84int sys_fstatfs64();
85int sys_fsync();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000086int sys_ftruncate();
87int sys_ftruncate64();
88int sys_futex();
89int sys_futimesat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000090int sys_get_mempolicy();
91int sys_get_thread_area();
92int sys_getcpu();
93int sys_getcwd();
94int sys_getdents();
95int sys_getdents64();
96int sys_getdtablesize();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000097int sys_getgroups();
98int sys_getgroups32();
99int sys_gethostname();
100int sys_getitimer();
101int sys_getpeername();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000102int sys_getpmsg();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000103int sys_getpriority();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000104int sys_getresuid();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000105int sys_getrlimit();
106int sys_getrusage();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000107int sys_getsockname();
108int sys_getsockopt();
109int sys_gettimeofday();
110int sys_getuid();
111int sys_getxattr();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000112int sys_init_module();
113int sys_inotify_add_watch();
114int sys_inotify_init1();
115int sys_inotify_rm_watch();
116int sys_io_cancel();
117int sys_io_destroy();
118int sys_io_getevents();
119int sys_io_setup();
120int sys_io_submit();
121int sys_ioctl();
Dmitry V. Levinb5e88d42012-02-20 17:02:38 +0000122int sys_ipc();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000123int sys_kill();
124int sys_link();
125int sys_linkat();
126int sys_listen();
127int sys_listxattr();
128int sys_llseek();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000129int sys_lseek();
130int sys_lstat();
131int sys_lstat64();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000132int sys_madvise();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000133int sys_mbind();
134int sys_mincore();
135int sys_mkdir();
136int sys_mkdirat();
137int sys_mknod();
138int sys_mknodat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000139int sys_mlockall();
140int sys_mmap();
141int sys_modify_ldt();
142int sys_mount();
143int sys_move_pages();
144int sys_mprotect();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000145int sys_mq_getsetattr();
146int sys_mq_notify();
147int sys_mq_open();
148int sys_mq_timedreceive();
149int sys_mq_timedsend();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000150int sys_mremap();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000151int sys_msgctl();
152int sys_msgget();
153int sys_msgrcv();
154int sys_msgsnd();
155int sys_msync();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000156int sys_munmap();
157int sys_nanosleep();
158int sys_newfstatat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000159int sys_old_mmap();
160int sys_oldfstat();
161int sys_oldlstat();
162int sys_oldselect();
163int sys_oldstat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000164int sys_open();
165int sys_openat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000166int sys_personality();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000167int sys_pipe();
168int sys_pipe2();
169int sys_poll();
170int sys_poll();
171int sys_ppoll();
172int sys_prctl();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000173int sys_pread();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000174int sys_preadv();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000175int sys_pselect6();
176int sys_ptrace();
Denys Vlasenko3af224c2012-01-28 01:46:33 +0100177int sys_process_vm_readv();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000178int sys_putpmsg();
179int sys_pwrite();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000180int sys_pwritev();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000181int sys_query_module();
182int sys_quotactl();
183int sys_read();
184int sys_readahead();
185int sys_readdir();
186int sys_readlink();
187int sys_readlinkat();
188int sys_readv();
189int sys_reboot();
190int sys_recv();
191int sys_recvfrom();
192int sys_recvmmsg();
193int sys_recvmsg();
194int sys_remap_file_pages();
195int sys_removexattr();
196int sys_renameat();
197int sys_restart_syscall();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000198int sys_rt_sigaction();
199int sys_rt_sigpending();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000200int sys_rt_sigprocmask();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000201int sys_rt_sigqueueinfo();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000202int sys_rt_sigsuspend();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000203int sys_rt_sigtimedwait();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000204int sys_sched_get_priority_min();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000205int sys_sched_getaffinity();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000206int sys_sched_getparam();
207int sys_sched_getscheduler();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000208int sys_sched_setaffinity();
209int sys_sched_setparam();
210int sys_sched_setscheduler();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000211int sys_select();
212int sys_semctl();
213int sys_semget();
214int sys_semop();
215int sys_semtimedop();
216int sys_send();
217int sys_sendfile();
218int sys_sendfile64();
219int sys_sendmsg();
220int sys_sendto();
221int sys_set_mempolicy();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000222int sys_set_thread_area();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000223int sys_setdomainname();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000224int sys_setfsuid();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000225int sys_setgroups();
226int sys_setgroups32();
227int sys_sethostname();
228int sys_setitimer();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000229int sys_setpriority();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000230int sys_setresuid();
231int sys_setreuid();
232int sys_setrlimit();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000233int sys_setsockopt();
234int sys_settimeofday();
235int sys_setuid();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000236int sys_setxattr();
237int sys_shmat();
238int sys_shmctl();
239int sys_shmdt();
240int sys_shmget();
241int sys_shutdown();
242int sys_sigaction();
243int sys_sigaltstack();
244int sys_siggetmask();
245int sys_signal();
246int sys_signalfd();
247int sys_signalfd4();
248int sys_sigpending();
249int sys_sigprocmask();
250int sys_sigreturn();
251int sys_sigsetmask();
252int sys_sigsuspend();
253int sys_socket();
Dmitry V. Levinb5e88d42012-02-20 17:02:38 +0000254int sys_socketcall();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000255int sys_socketpair();
256int sys_splice();
257int sys_stat();
258int sys_stat64();
259int sys_statfs();
260int sys_statfs64();
261int sys_stime();
Dmitry V. Levin88293652012-03-09 21:02:19 +0000262int sys_swapon();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000263int sys_symlinkat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000264int sys_sysctl();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000265int sys_sysinfo();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000266int sys_tee();
267int sys_tgkill();
268int sys_time();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000269int sys_timer_create();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000270int sys_timer_gettime();
271int sys_timer_settime();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000272int sys_timerfd();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000273int sys_timerfd_create();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000274int sys_timerfd_gettime();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000275int sys_timerfd_settime();
276int sys_times();
277int sys_truncate();
278int sys_truncate64();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000279int sys_umask();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000280int sys_umount2();
281int sys_uname();
Dmitry V. Levin95ebf5a2006-10-13 20:25:12 +0000282int sys_unlinkat();
Dmitry V. Levin95ebf5a2006-10-13 20:25:12 +0000283int sys_unshare();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000284int sys_utime();
285int sys_utimensat();
286int sys_utimes();
287int sys_vfork();
Dmitry V. Levind99e48c2011-10-11 17:07:05 +0000288int sys_vmsplice();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000289int sys_wait4();
290int sys_waitid();
291int sys_waitpid();
292int sys_write();
293int sys_writev();
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000294
Wichert Akkerman0ae852b1999-11-18 17:12:55 +0000295/* architecture-specific calls */
296#ifdef ALPHA
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000297int osf_statfs();
298int osf_fstatfs();
Wichert Akkerman221f54f1999-11-18 17:26:45 +0000299int sys_osf_getitimer();
Wichert Akkerman221f54f1999-11-18 17:26:45 +0000300int sys_osf_getrusage();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000301int sys_osf_gettimeofday();
302int sys_osf_select();
303int sys_osf_setitimer();
304int sys_osf_settimeofday();
Wichert Akkerman221f54f1999-11-18 17:26:45 +0000305int sys_osf_utimes();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000306int sys_osf_wait4();
Wichert Akkerman0ae852b1999-11-18 17:12:55 +0000307#endif
308
Roland McGrathd94020f2008-08-25 03:15:43 +0000309#if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
310 !defined(__ARM_EABI__)
Mike Frysinger330a8952011-02-19 15:48:52 -0500311# if defined(SPARC) || defined(SPARC64)
312# define SYS_socket_subcall 353
313# else
Roland McGrathfeb83812006-08-22 06:06:12 +0000314# define SYS_socket_subcall 400
Mike Frysinger330a8952011-02-19 15:48:52 -0500315# endif
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000316
Andreas Schwab0873f292010-02-12 21:39:12 +0100317#define SYS_socket_nsubcalls 20
Roland McGrathe69b6272005-06-07 23:21:28 +0000318#endif /* !(ALPHA || MIPS || HPPA) */
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000319
Mike Frysinger330a8952011-02-19 15:48:52 -0500320#if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
Roland McGrathd94020f2008-08-25 03:15:43 +0000321 !defined(__ARM_EABI__)
Roland McGrath2c71e0d2002-12-15 23:58:19 +0000322#define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000323#define SYS_ipc_nsubcalls 25
Mike Frysinger330a8952011-02-19 15:48:52 -0500324#endif /* !(ALPHA || MIPS || HPPA) */
Roland McGrathe69b6272005-06-07 23:21:28 +0000325
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000326#if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
Wichert Akkerman8b1b40c2000-02-03 21:58:30 +0000327int sys_getpagesize();
328#endif
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000329
Wichert Akkerman8b1b40c2000-02-03 21:58:30 +0000330#ifdef IA64
Dmitry V. Levindd760852011-11-28 23:25:13 +0000331/* STREAMS stuff */
332int sys_getpmsg();
333int sys_putpmsg();
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000334#endif
335
Wichert Akkerman0cbfb322001-02-19 13:35:53 +0000336#ifdef MIPS
Wichert Akkermand6b92492001-04-07 21:37:12 +0000337int sys_sysmips();
Wichert Akkerman0cbfb322001-02-19 13:35:53 +0000338#endif
339
Carmelo AMOROSOf8e56502010-12-01 14:27:07 +0100340#if defined M68K || defined SH
Wichert Akkerman2e2553a1999-05-09 00:29:58 +0000341int sys_cacheflush();
342#endif
Roland McGrath542c2c62008-05-20 01:11:56 +0000343
Roland McGrath4a6f6522008-08-25 03:09:16 +0000344#ifdef POWERPC
345int sys_subpage_prot();
346#endif
Dmitry V. Levin87ea1f42008-11-10 22:21:41 +0000347
348#ifdef BFIN
Mike Frysinger260e5712010-09-11 15:04:18 -0400349int sys_cacheflush();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000350int sys_sram_alloc();
Dmitry V. Levin87ea1f42008-11-10 22:21:41 +0000351#endif
Mike Frysinger330a8952011-02-19 15:48:52 -0500352
353#if defined SPARC || defined SPARC64
354#include "sparc/syscall1.h"
355int sys_execv();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000356int sys_getmsg();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000357int sys_msgsys();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000358int sys_putmsg();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000359int sys_semsys();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000360int sys_shmsys();
Mike Frysinger330a8952011-02-19 15:48:52 -0500361#define SYS_semsys_subcall 200
362#define SYS_semsys_nsubcalls 3
Mike Frysinger330a8952011-02-19 15:48:52 -0500363#define SYS_msgsys_subcall 203
364#define SYS_msgsys_nsubcalls 4
Mike Frysinger330a8952011-02-19 15:48:52 -0500365#define SYS_shmsys_subcall 207
366#define SYS_shmsys_nsubcalls 4
Mike Frysinger330a8952011-02-19 15:48:52 -0500367#endif