blob: 090b54c34a9a0666cd50af935b8fa976d9590edc [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.
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000027 */
28
29#include "dummy.h"
30
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000031/* common syscalls */
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000032
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000033int sys_accept();
34int sys_accept4();
35int sys_access();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000036int sys_adjtimex();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000037int sys_arch_prctl();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000038int sys_bind();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000039int sys_brk();
40int sys_capget();
41int sys_capset();
Dmitry V. Levindd760852011-11-28 23:25:13 +000042int sys_chdir();
Dmitry V. Levindd760852011-11-28 23:25:13 +000043int sys_chmod();
44int sys_chown();
Dmitry V. Levin73215472012-03-11 21:25:51 +000045int sys_clock_adjtime();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000046int sys_clock_gettime();
47int sys_clock_nanosleep();
48int sys_clock_settime();
49int sys_clone();
50int sys_close();
51int sys_connect();
52int sys_creat();
53int sys_create_module();
Dmitry V. Levindd760852011-11-28 23:25:13 +000054int sys_dup2();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000055int sys_dup3();
56int sys_epoll_create();
57int sys_epoll_create1();
58int sys_epoll_ctl();
59int sys_epoll_pwait();
60int sys_epoll_wait();
61int sys_eventfd();
62int sys_eventfd2();
63int sys_execve();
64int sys_exit();
65int sys_faccessat();
66int sys_fadvise64();
67int sys_fadvise64_64();
68int sys_fallocate();
69int sys_fchmod();
70int sys_fchmodat();
71int sys_fchown();
72int sys_fchownat();
73int sys_fcntl();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000074int sys_fgetxattr();
75int sys_flistxattr();
76int sys_flock();
77int sys_fork();
78int sys_fremovexattr();
79int sys_fsetxattr();
80int sys_fstat();
81int sys_fstat64();
82int sys_fstatfs();
83int sys_fstatfs64();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000084int sys_ftruncate();
85int sys_ftruncate64();
86int sys_futex();
87int sys_futimesat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000088int sys_get_mempolicy();
Dmitry V. Levin1b0bae22012-03-11 22:32:26 +000089int sys_get_robust_list();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000090int sys_get_thread_area();
91int sys_getcpu();
92int sys_getcwd();
93int sys_getdents();
94int sys_getdents64();
95int sys_getdtablesize();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +000096int sys_getgroups();
97int sys_getgroups32();
98int sys_gethostname();
99int sys_getitimer();
100int sys_getpeername();
Denys Vlasenkoe7db4652013-03-05 16:17:46 +0100101int sys_getpmsg(); /* TODO: non-Linux, remove? */
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000102int sys_getpriority();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000103int sys_getresuid();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000104int sys_getrlimit();
105int sys_getrusage();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000106int sys_getsockname();
107int sys_getsockopt();
108int sys_gettimeofday();
109int sys_getuid();
110int sys_getxattr();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000111int sys_init_module();
112int sys_inotify_add_watch();
113int sys_inotify_init1();
114int sys_inotify_rm_watch();
115int sys_io_cancel();
116int sys_io_destroy();
117int sys_io_getevents();
118int sys_io_setup();
119int sys_io_submit();
120int sys_ioctl();
Dmitry V. Levinb5e88d42012-02-20 17:02:38 +0000121int sys_ipc();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000122int sys_kill();
123int sys_link();
124int sys_linkat();
125int sys_listen();
126int sys_listxattr();
127int sys_llseek();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000128int sys_lseek();
129int sys_lstat();
130int sys_lstat64();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000131int sys_madvise();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000132int sys_mbind();
Dmitry V. Levin64d0e712012-03-11 22:44:14 +0000133int sys_migrate_pages();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000134int 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();
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100141int sys_mmap_pgoff();
142int sys_mmap_4koff();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000143int 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();
Denys Vlasenko1ba85432013-02-19 11:28:20 +0100162int sys_old_mmap_pgoff();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000163int sys_oldfstat();
164int sys_oldlstat();
165int sys_oldselect();
166int sys_oldstat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000167int sys_open();
168int sys_openat();
Ben Noordhuis88eafd82013-02-04 00:04:57 +0100169int sys_perf_event_open();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000170int sys_personality();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000171int sys_pipe();
172int sys_pipe2();
173int sys_poll();
174int sys_poll();
175int sys_ppoll();
176int sys_prctl();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000177int sys_pread();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000178int sys_preadv();
Dmitry V. Levinb468f232012-03-16 23:05:21 +0400179int sys_prlimit64();
Denys Vlasenko3af224c2012-01-28 01:46:33 +0100180int sys_process_vm_readv();
Dmitry V. Levin03952102012-03-10 14:14:49 +0000181int sys_process_vm_writev();
Dmitry V. Levinb468f232012-03-16 23:05:21 +0400182int sys_pselect6();
183int sys_ptrace();
Denys Vlasenkoe7db4652013-03-05 16:17:46 +0100184int sys_putpmsg(); /* TODO: non-Linux, remove? */
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000185int sys_pwrite();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000186int sys_pwritev();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000187int sys_query_module();
188int sys_quotactl();
189int sys_read();
190int sys_readahead();
191int sys_readdir();
192int sys_readlink();
193int sys_readlinkat();
194int sys_readv();
195int sys_reboot();
196int sys_recv();
197int sys_recvfrom();
198int sys_recvmmsg();
199int sys_recvmsg();
200int sys_remap_file_pages();
201int sys_removexattr();
202int sys_renameat();
203int sys_restart_syscall();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000204int sys_rt_sigaction();
205int sys_rt_sigpending();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000206int sys_rt_sigprocmask();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000207int sys_rt_sigqueueinfo();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000208int sys_rt_sigsuspend();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000209int sys_rt_sigtimedwait();
Dmitry V. Levin297632b2012-03-13 15:51:13 +0000210int sys_rt_tgsigqueueinfo();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000211int sys_sched_get_priority_min();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000212int sys_sched_getaffinity();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000213int sys_sched_getparam();
214int sys_sched_getscheduler();
Dmitry V. Levin1ff463d2012-03-11 23:00:11 +0000215int sys_sched_rr_get_interval();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000216int sys_sched_setaffinity();
217int sys_sched_setparam();
218int sys_sched_setscheduler();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000219int sys_select();
220int sys_semctl();
221int sys_semget();
222int sys_semop();
223int sys_semtimedop();
224int sys_send();
225int sys_sendfile();
226int sys_sendfile64();
Dmitry V. Levin7af9f352012-03-11 23:59:29 +0000227int sys_sendmmsg();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000228int sys_sendmsg();
229int sys_sendto();
230int sys_set_mempolicy();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000231int sys_set_thread_area();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000232int sys_setdomainname();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000233int sys_setfsuid();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000234int sys_setgroups();
235int sys_setgroups32();
236int sys_sethostname();
237int sys_setitimer();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000238int sys_setpriority();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000239int sys_setresuid();
240int sys_setreuid();
241int sys_setrlimit();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000242int sys_setsockopt();
243int sys_settimeofday();
244int sys_setuid();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000245int sys_setxattr();
246int sys_shmat();
247int sys_shmctl();
248int sys_shmdt();
249int sys_shmget();
250int sys_shutdown();
251int sys_sigaction();
252int sys_sigaltstack();
253int sys_siggetmask();
254int sys_signal();
255int sys_signalfd();
256int sys_signalfd4();
257int sys_sigpending();
258int sys_sigprocmask();
259int sys_sigreturn();
260int sys_sigsetmask();
261int sys_sigsuspend();
262int sys_socket();
Dmitry V. Levinb5e88d42012-02-20 17:02:38 +0000263int sys_socketcall();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000264int sys_socketpair();
265int sys_splice();
266int sys_stat();
267int sys_stat64();
268int sys_statfs();
269int sys_statfs64();
270int sys_stime();
Dmitry V. Levin88293652012-03-09 21:02:19 +0000271int sys_swapon();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000272int sys_symlinkat();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000273int sys_sysctl();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000274int sys_sysinfo();
Dmitry V. Levinee3c22c2012-03-13 15:28:01 +0000275int sys_syslog();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000276int sys_tee();
277int sys_tgkill();
278int sys_time();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000279int sys_timer_create();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000280int sys_timer_gettime();
281int sys_timer_settime();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000282int sys_timerfd();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000283int sys_timerfd_create();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000284int sys_timerfd_gettime();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000285int sys_timerfd_settime();
286int sys_times();
287int sys_truncate();
288int sys_truncate64();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000289int sys_umask();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000290int sys_umount2();
291int sys_uname();
Dmitry V. Levin95ebf5a2006-10-13 20:25:12 +0000292int sys_unlinkat();
Dmitry V. Levin95ebf5a2006-10-13 20:25:12 +0000293int sys_unshare();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000294int sys_utime();
295int sys_utimensat();
296int sys_utimes();
297int sys_vfork();
Dmitry V. Levind99e48c2011-10-11 17:07:05 +0000298int sys_vmsplice();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000299int sys_wait4();
300int sys_waitid();
301int sys_waitpid();
302int sys_write();
303int sys_writev();
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000304
Wichert Akkerman0ae852b1999-11-18 17:12:55 +0000305/* architecture-specific calls */
306#ifdef ALPHA
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000307int osf_statfs();
308int osf_fstatfs();
Wichert Akkerman221f54f1999-11-18 17:26:45 +0000309int sys_osf_getitimer();
Wichert Akkerman221f54f1999-11-18 17:26:45 +0000310int sys_osf_getrusage();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000311int sys_osf_gettimeofday();
312int sys_osf_select();
313int sys_osf_setitimer();
314int sys_osf_settimeofday();
Wichert Akkerman221f54f1999-11-18 17:26:45 +0000315int sys_osf_utimes();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000316int sys_osf_wait4();
Wichert Akkerman0ae852b1999-11-18 17:12:55 +0000317#endif
318
Denys Vlasenkoa32086f2013-02-17 01:37:35 +0100319#if !defined(ALPHA) \
320 && !defined(MIPS) \
321 && !defined(HPPA) \
322 && !defined(__ARM_EABI__)
Mike Frysinger330a8952011-02-19 15:48:52 -0500323# if defined(SPARC) || defined(SPARC64)
324# define SYS_socket_subcall 353
325# else
Roland McGrathfeb83812006-08-22 06:06:12 +0000326# define SYS_socket_subcall 400
Mike Frysinger330a8952011-02-19 15:48:52 -0500327# endif
Denys Vlasenkoa32086f2013-02-17 01:37:35 +0100328# define SYS_socket_nsubcalls 20
329# define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
330# define SYS_ipc_nsubcalls 25
331#endif
Roland McGrathe69b6272005-06-07 23:21:28 +0000332
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000333#if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
Wichert Akkerman8b1b40c2000-02-03 21:58:30 +0000334int sys_getpagesize();
335#endif
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000336
Wichert Akkerman0cbfb322001-02-19 13:35:53 +0000337#ifdef MIPS
Wichert Akkermand6b92492001-04-07 21:37:12 +0000338int sys_sysmips();
Wichert Akkerman0cbfb322001-02-19 13:35:53 +0000339#endif
340
Carmelo AMOROSOf8e56502010-12-01 14:27:07 +0100341#if defined M68K || defined SH
Wichert Akkerman2e2553a1999-05-09 00:29:58 +0000342int sys_cacheflush();
343#endif
Roland McGrath542c2c62008-05-20 01:11:56 +0000344
Christian Svensson492f81f2013-02-14 13:26:27 +0100345#if defined OR1K
346int sys_or1k_atomic();
347#endif
348
Roland McGrath4a6f6522008-08-25 03:09:16 +0000349#ifdef POWERPC
350int sys_subpage_prot();
351#endif
Dmitry V. Levin87ea1f42008-11-10 22:21:41 +0000352
353#ifdef BFIN
Mike Frysinger260e5712010-09-11 15:04:18 -0400354int sys_cacheflush();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000355int sys_sram_alloc();
Dmitry V. Levin87ea1f42008-11-10 22:21:41 +0000356#endif
Mike Frysinger330a8952011-02-19 15:48:52 -0500357
358#if defined SPARC || defined SPARC64
359#include "sparc/syscall1.h"
360int sys_execv();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000361int sys_getmsg();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000362int sys_msgsys();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000363int sys_putmsg();
Dmitry V. Levindd760852011-11-28 23:25:13 +0000364int sys_semsys();
Dmitry V. Levina12c70d2011-11-28 23:41:58 +0000365int sys_shmsys();
Mike Frysinger330a8952011-02-19 15:48:52 -0500366#define SYS_semsys_subcall 200
367#define SYS_semsys_nsubcalls 3
Mike Frysinger330a8952011-02-19 15:48:52 -0500368#define SYS_msgsys_subcall 203
369#define SYS_msgsys_nsubcalls 4
Mike Frysinger330a8952011-02-19 15:48:52 -0500370#define SYS_shmsys_subcall 207
371#define SYS_shmsys_nsubcalls 4
Mike Frysinger330a8952011-02-19 15:48:52 -0500372#endif