blob: b74c6c40874b23d5084003cf57d4b238851f5b1b [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. Levin73215472012-03-11 21:25:51 +000047int sys_clock_adjtime();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000048int sys_clock_gettime();
49int sys_clock_nanosleep();
50int sys_clock_settime();
51int sys_clone();
52int sys_close();
53int sys_connect();
54int sys_creat();
55int sys_create_module();
Dmitry V. Levindd760852011-11-28 23:25:13 +000056int sys_dup2();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000057int sys_dup3();
58int sys_epoll_create();
59int sys_epoll_create1();
60int sys_epoll_ctl();
61int sys_epoll_pwait();
62int sys_epoll_wait();
63int sys_eventfd();
64int sys_eventfd2();
65int sys_execve();
66int sys_exit();
67int sys_faccessat();
68int sys_fadvise64();
69int sys_fadvise64_64();
70int sys_fallocate();
71int sys_fchmod();
72int sys_fchmodat();
73int sys_fchown();
74int sys_fchownat();
75int sys_fcntl();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000076int sys_fgetxattr();
77int sys_flistxattr();
78int sys_flock();
79int sys_fork();
80int sys_fremovexattr();
81int sys_fsetxattr();
82int sys_fstat();
83int sys_fstat64();
84int sys_fstatfs();
85int sys_fstatfs64();
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();
Dmitry V. Levin1b0bae22012-03-11 22:32:26 +000091int sys_get_robust_list();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000092int sys_get_thread_area();
93int sys_getcpu();
94int sys_getcwd();
95int sys_getdents();
96int sys_getdents64();
97int sys_getdtablesize();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000098int sys_getgroups();
99int sys_getgroups32();
100int sys_gethostname();
101int sys_getitimer();
102int sys_getpeername();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000103int sys_getpmsg();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000104int sys_getpriority();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000105int sys_getresuid();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000106int sys_getrlimit();
107int sys_getrusage();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000108int sys_getsockname();
109int sys_getsockopt();
110int sys_gettimeofday();
111int sys_getuid();
112int sys_getxattr();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000113int sys_init_module();
114int sys_inotify_add_watch();
115int sys_inotify_init1();
116int sys_inotify_rm_watch();
117int sys_io_cancel();
118int sys_io_destroy();
119int sys_io_getevents();
120int sys_io_setup();
121int sys_io_submit();
122int sys_ioctl();
Dmitry V. Levinb5e88d42012-02-20 17:02:38 +0000123int sys_ipc();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000124int sys_kill();
125int sys_link();
126int sys_linkat();
127int sys_listen();
128int sys_listxattr();
129int sys_llseek();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000130int sys_lseek();
131int sys_lstat();
132int sys_lstat64();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000133int sys_madvise();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000134int sys_mbind();
Dmitry V. Levin64d0e712012-03-11 22:44:14 +0000135int sys_migrate_pages();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000136int sys_mincore();
137int sys_mkdir();
138int sys_mkdirat();
139int sys_mknod();
140int sys_mknodat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000141int sys_mlockall();
142int sys_mmap();
143int sys_modify_ldt();
144int sys_mount();
145int sys_move_pages();
146int sys_mprotect();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000147int sys_mq_getsetattr();
148int sys_mq_notify();
149int sys_mq_open();
150int sys_mq_timedreceive();
151int sys_mq_timedsend();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000152int sys_mremap();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000153int sys_msgctl();
154int sys_msgget();
155int sys_msgrcv();
156int sys_msgsnd();
157int sys_msync();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000158int sys_munmap();
159int sys_nanosleep();
160int sys_newfstatat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000161int sys_old_mmap();
162int sys_oldfstat();
163int sys_oldlstat();
164int sys_oldselect();
165int sys_oldstat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000166int sys_open();
167int sys_openat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000168int sys_personality();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000169int sys_pipe();
170int sys_pipe2();
171int sys_poll();
172int sys_poll();
173int sys_ppoll();
174int sys_prctl();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000175int sys_pread();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000176int sys_preadv();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000177int sys_pselect6();
178int sys_ptrace();
Denys Vlasenko3af224c2012-01-28 01:46:33 +0100179int sys_process_vm_readv();
Dmitry V. Levin03952102012-03-10 14:14:49 +0000180int sys_process_vm_writev();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000181int sys_putpmsg();
182int sys_pwrite();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000183int sys_pwritev();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000184int sys_query_module();
185int sys_quotactl();
186int sys_read();
187int sys_readahead();
188int sys_readdir();
189int sys_readlink();
190int sys_readlinkat();
191int sys_readv();
192int sys_reboot();
193int sys_recv();
194int sys_recvfrom();
195int sys_recvmmsg();
196int sys_recvmsg();
197int sys_remap_file_pages();
198int sys_removexattr();
199int sys_renameat();
200int sys_restart_syscall();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000201int sys_rt_sigaction();
202int sys_rt_sigpending();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000203int sys_rt_sigprocmask();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000204int sys_rt_sigqueueinfo();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000205int sys_rt_sigsuspend();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000206int sys_rt_sigtimedwait();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000207int sys_sched_get_priority_min();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000208int sys_sched_getaffinity();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000209int sys_sched_getparam();
210int sys_sched_getscheduler();
Dmitry V. Levin1ff463d2012-03-11 23:00:11 +0000211int sys_sched_rr_get_interval();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000212int sys_sched_setaffinity();
213int sys_sched_setparam();
214int sys_sched_setscheduler();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000215int sys_select();
216int sys_semctl();
217int sys_semget();
218int sys_semop();
219int sys_semtimedop();
220int sys_send();
221int sys_sendfile();
222int sys_sendfile64();
Dmitry V. Levin7af9f352012-03-11 23:59:29 +0000223int sys_sendmmsg();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000224int sys_sendmsg();
225int sys_sendto();
226int sys_set_mempolicy();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000227int sys_set_thread_area();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000228int sys_setdomainname();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000229int sys_setfsuid();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000230int sys_setgroups();
231int sys_setgroups32();
232int sys_sethostname();
233int sys_setitimer();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000234int sys_setpriority();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000235int sys_setresuid();
236int sys_setreuid();
237int sys_setrlimit();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000238int sys_setsockopt();
239int sys_settimeofday();
240int sys_setuid();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000241int sys_setxattr();
242int sys_shmat();
243int sys_shmctl();
244int sys_shmdt();
245int sys_shmget();
246int sys_shutdown();
247int sys_sigaction();
248int sys_sigaltstack();
249int sys_siggetmask();
250int sys_signal();
251int sys_signalfd();
252int sys_signalfd4();
253int sys_sigpending();
254int sys_sigprocmask();
255int sys_sigreturn();
256int sys_sigsetmask();
257int sys_sigsuspend();
258int sys_socket();
Dmitry V. Levinb5e88d42012-02-20 17:02:38 +0000259int sys_socketcall();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000260int sys_socketpair();
261int sys_splice();
262int sys_stat();
263int sys_stat64();
264int sys_statfs();
265int sys_statfs64();
266int sys_stime();
Dmitry V. Levin88293652012-03-09 21:02:19 +0000267int sys_swapon();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000268int sys_symlinkat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000269int sys_sysctl();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000270int sys_sysinfo();
Dmitry V. Levinee3c22c2012-03-13 15:28:01 +0000271int sys_syslog();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000272int sys_tee();
273int sys_tgkill();
274int sys_time();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000275int sys_timer_create();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000276int sys_timer_gettime();
277int sys_timer_settime();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000278int sys_timerfd();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000279int sys_timerfd_create();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000280int sys_timerfd_gettime();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000281int sys_timerfd_settime();
282int sys_times();
283int sys_truncate();
284int sys_truncate64();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000285int sys_umask();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000286int sys_umount2();
287int sys_uname();
Dmitry V. Levin95ebf5a2006-10-13 20:25:12 +0000288int sys_unlinkat();
Dmitry V. Levin95ebf5a2006-10-13 20:25:12 +0000289int sys_unshare();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000290int sys_utime();
291int sys_utimensat();
292int sys_utimes();
293int sys_vfork();
Dmitry V. Levind99e48c2011-10-11 17:07:05 +0000294int sys_vmsplice();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000295int sys_wait4();
296int sys_waitid();
297int sys_waitpid();
298int sys_write();
299int sys_writev();
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000300
Wichert Akkerman0ae852b1999-11-18 17:12:55 +0000301/* architecture-specific calls */
302#ifdef ALPHA
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000303int osf_statfs();
304int osf_fstatfs();
Wichert Akkerman221f54f1999-11-18 17:26:45 +0000305int sys_osf_getitimer();
Wichert Akkerman221f54f1999-11-18 17:26:45 +0000306int sys_osf_getrusage();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000307int sys_osf_gettimeofday();
308int sys_osf_select();
309int sys_osf_setitimer();
310int sys_osf_settimeofday();
Wichert Akkerman221f54f1999-11-18 17:26:45 +0000311int sys_osf_utimes();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000312int sys_osf_wait4();
Wichert Akkerman0ae852b1999-11-18 17:12:55 +0000313#endif
314
Roland McGrathd94020f2008-08-25 03:15:43 +0000315#if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
316 !defined(__ARM_EABI__)
Mike Frysinger330a8952011-02-19 15:48:52 -0500317# if defined(SPARC) || defined(SPARC64)
318# define SYS_socket_subcall 353
319# else
Roland McGrathfeb83812006-08-22 06:06:12 +0000320# define SYS_socket_subcall 400
Mike Frysinger330a8952011-02-19 15:48:52 -0500321# endif
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000322
Andreas Schwab0873f292010-02-12 21:39:12 +0100323#define SYS_socket_nsubcalls 20
Roland McGrathe69b6272005-06-07 23:21:28 +0000324#endif /* !(ALPHA || MIPS || HPPA) */
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000325
Mike Frysinger330a8952011-02-19 15:48:52 -0500326#if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
Roland McGrathd94020f2008-08-25 03:15:43 +0000327 !defined(__ARM_EABI__)
Roland McGrath2c71e0d2002-12-15 23:58:19 +0000328#define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000329#define SYS_ipc_nsubcalls 25
Mike Frysinger330a8952011-02-19 15:48:52 -0500330#endif /* !(ALPHA || MIPS || HPPA) */
Roland McGrathe69b6272005-06-07 23:21:28 +0000331
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000332#if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
Wichert Akkerman8b1b40c2000-02-03 21:58:30 +0000333int sys_getpagesize();
334#endif
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000335
Wichert Akkerman8b1b40c2000-02-03 21:58:30 +0000336#ifdef IA64
Dmitry V. Levindd760852011-11-28 23:25:13 +0000337/* STREAMS stuff */
338int sys_getpmsg();
339int sys_putpmsg();
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000340#endif
341
Wichert Akkerman0cbfb322001-02-19 13:35:53 +0000342#ifdef MIPS
Wichert Akkermand6b92492001-04-07 21:37:12 +0000343int sys_sysmips();
Wichert Akkerman0cbfb322001-02-19 13:35:53 +0000344#endif
345
Carmelo AMOROSOf8e56502010-12-01 14:27:07 +0100346#if defined M68K || defined SH
Wichert Akkerman2e2553a1999-05-09 00:29:58 +0000347int sys_cacheflush();
348#endif
Roland McGrath542c2c62008-05-20 01:11:56 +0000349
Roland McGrath4a6f6522008-08-25 03:09:16 +0000350#ifdef POWERPC
351int sys_subpage_prot();
352#endif
Dmitry V. Levin87ea1f42008-11-10 22:21:41 +0000353
354#ifdef BFIN
Mike Frysinger260e5712010-09-11 15:04:18 -0400355int sys_cacheflush();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000356int sys_sram_alloc();
Dmitry V. Levin87ea1f42008-11-10 22:21:41 +0000357#endif
Mike Frysinger330a8952011-02-19 15:48:52 -0500358
359#if defined SPARC || defined SPARC64
360#include "sparc/syscall1.h"
361int sys_execv();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000362int sys_getmsg();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000363int sys_msgsys();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000364int sys_putmsg();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000365int sys_semsys();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000366int sys_shmsys();
Mike Frysinger330a8952011-02-19 15:48:52 -0500367#define SYS_semsys_subcall 200
368#define SYS_semsys_nsubcalls 3
Mike Frysinger330a8952011-02-19 15:48:52 -0500369#define SYS_msgsys_subcall 203
370#define SYS_msgsys_nsubcalls 4
Mike Frysinger330a8952011-02-19 15:48:52 -0500371#define SYS_shmsys_subcall 207
372#define SYS_shmsys_nsubcalls 4
Mike Frysinger330a8952011-02-19 15:48:52 -0500373#endif