]> granicus.if.org Git - strace/blob - linux/syscall.h
linux/syscall.h: Remove redundant function declarations
[strace] / linux / syscall.h
1 /*
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 /* common syscalls */
34
35 int sys_accept();
36 int sys_accept4();
37 int sys_access();
38 int sys_adjtimex();
39 int sys_alarm();
40 int sys_arch_prctl();
41 int sys_bind();
42 int sys_brk();
43 int sys_capget();
44 int sys_capset();
45 int sys_chdir();
46 int sys_chmod();
47 int sys_chown();
48 int sys_clock_gettime();
49 int sys_clock_nanosleep();
50 int sys_clock_settime();
51 int sys_clone();
52 int sys_close();
53 int sys_connect();
54 int sys_creat();
55 int sys_create_module();
56 int sys_dup2();
57 int sys_dup3();
58 int sys_epoll_create();
59 int sys_epoll_create1();
60 int sys_epoll_ctl();
61 int sys_epoll_pwait();
62 int sys_epoll_wait();
63 int sys_eventfd();
64 int sys_eventfd2();
65 int sys_execve();
66 int sys_exit();
67 int sys_faccessat();
68 int sys_fadvise64();
69 int sys_fadvise64_64();
70 int sys_fallocate();
71 int sys_fchmod();
72 int sys_fchmodat();
73 int sys_fchown();
74 int sys_fchownat();
75 int sys_fcntl();
76 int sys_fgetxattr();
77 int sys_flistxattr();
78 int sys_flock();
79 int sys_fork();
80 int sys_fremovexattr();
81 int sys_fsetxattr();
82 int sys_fstat();
83 int sys_fstat64();
84 int sys_fstatfs();
85 int sys_fstatfs64();
86 int sys_fsync();
87 int sys_ftruncate();
88 int sys_ftruncate64();
89 int sys_futex();
90 int sys_futimesat();
91 int sys_get_mempolicy();
92 int sys_get_thread_area();
93 int sys_getcpu();
94 int sys_getcwd();
95 int sys_getdents();
96 int sys_getdents64();
97 int sys_getdtablesize();
98 int sys_getgroups();
99 int sys_getgroups32();
100 int sys_gethostname();
101 int sys_getitimer();
102 int sys_getpeername();
103 int sys_getpmsg();
104 int sys_getpriority();
105 int sys_getresgid();
106 int sys_getresuid();
107 int sys_getrlimit();
108 int sys_getrusage();
109 int sys_getsid();
110 int sys_getsockname();
111 int sys_getsockopt();
112 int sys_gettimeofday();
113 int sys_getuid();
114 int sys_getxattr();
115 int sys_init_module();
116 int sys_inotify_add_watch();
117 int sys_inotify_init1();
118 int sys_inotify_rm_watch();
119 int sys_io_cancel();
120 int sys_io_destroy();
121 int sys_io_getevents();
122 int sys_io_setup();
123 int sys_io_submit();
124 int sys_ioctl();
125 int sys_kill();
126 int sys_link();
127 int sys_linkat();
128 int sys_listen();
129 int sys_listxattr();
130 int sys_llseek();
131 int sys_lseek();
132 int sys_lstat();
133 int sys_lstat64();
134 int sys_madvise();
135 int sys_mbind();
136 int sys_mincore();
137 int sys_mkdir();
138 int sys_mkdirat();
139 int sys_mknod();
140 int sys_mknodat();
141 int sys_mlockall();
142 int sys_mmap();
143 int sys_modify_ldt();
144 int sys_mount();
145 int sys_move_pages();
146 int sys_mprotect();
147 int sys_mq_getsetattr();
148 int sys_mq_notify();
149 int sys_mq_open();
150 int sys_mq_timedreceive();
151 int sys_mq_timedsend();
152 int sys_mremap();
153 int sys_msgctl();
154 int sys_msgget();
155 int sys_msgrcv();
156 int sys_msgsnd();
157 int sys_msync();
158 int sys_munmap();
159 int sys_nanosleep();
160 int sys_newfstatat();
161 int sys_nice();
162 int sys_old_mmap();
163 int sys_oldfstat();
164 int sys_oldlstat();
165 int sys_oldselect();
166 int sys_oldstat();
167 int sys_open();
168 int sys_openat();
169 int sys_personality();
170 int sys_pipe();
171 int sys_pipe2();
172 int sys_poll();
173 int sys_poll();
174 int sys_ppoll();
175 int sys_prctl();
176 int sys_pread();
177 int sys_pread64();
178 int sys_preadv();
179 int sys_pselect6();
180 int sys_ptrace();
181 int sys_putpmsg();
182 int sys_pwrite();
183 int sys_pwrite64();
184 int sys_pwritev();
185 int sys_query_module();
186 int sys_quotactl();
187 int sys_read();
188 int sys_readahead();
189 int sys_readdir();
190 int sys_readlink();
191 int sys_readlinkat();
192 int sys_readv();
193 int sys_reboot();
194 int sys_recv();
195 int sys_recvfrom();
196 int sys_recvmmsg();
197 int sys_recvmsg();
198 int sys_remap_file_pages();
199 int sys_removexattr();
200 int sys_renameat();
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();
215 int sys_select();
216 int sys_semctl();
217 int sys_semget();
218 int sys_semop();
219 int sys_semtimedop();
220 int sys_send();
221 int sys_sendfile();
222 int sys_sendfile64();
223 int sys_sendmsg();
224 int sys_sendto();
225 int sys_set_mempolicy();
226 int sys_set_thread_area();
227 int sys_setdomainname();
228 int sys_setfsuid();
229 int sys_setgid();
230 int sys_setgroups();
231 int sys_setgroups32();
232 int sys_sethostname();
233 int sys_setitimer();
234 int sys_setpgid();
235 int sys_setpgrp();
236 int sys_setpriority();
237 int sys_setregid();
238 int sys_setresgid();
239 int sys_setresuid();
240 int sys_setreuid();
241 int sys_setrlimit();
242 int sys_setsockopt();
243 int sys_settimeofday();
244 int sys_setuid();
245 int sys_setxattr();
246 int sys_shmat();
247 int sys_shmctl();
248 int sys_shmdt();
249 int sys_shmget();
250 int sys_shutdown();
251 int sys_sigaction();
252 int sys_sigaltstack();
253 int sys_siggetmask();
254 int sys_signal();
255 int sys_signalfd();
256 int sys_signalfd4();
257 int sys_sigpending();
258 int sys_sigprocmask();
259 int sys_sigreturn();
260 int sys_sigsetmask();
261 int sys_sigsuspend();
262 int sys_socket();
263 int sys_socketpair();
264 int sys_splice();
265 int sys_stat();
266 int sys_stat64();
267 int sys_statfs();
268 int sys_statfs64();
269 int sys_stime();
270 int sys_swapon();
271 int sys_symlinkat();
272 int sys_sysctl();
273 int sys_sysinfo();
274 int sys_tee();
275 int sys_tgkill();
276 int sys_time();
277 int sys_timer_create();
278 int sys_timer_gettime();
279 int sys_timer_settime();
280 int sys_timerfd();
281 int sys_timerfd_create();
282 int sys_timerfd_gettime();
283 int sys_timerfd_settime();
284 int sys_times();
285 int sys_truncate();
286 int sys_truncate64();
287 int sys_umask();
288 int sys_umount2();
289 int sys_uname();
290 int sys_unlinkat();
291 int sys_unshare();
292 int sys_utime();
293 int sys_utimensat();
294 int sys_utimes();
295 int sys_vfork();
296 int sys_vmsplice();
297 int sys_wait4();
298 int sys_waitid();
299 int sys_waitpid();
300 int sys_write();
301 int sys_writev();
302
303 /* architecture-specific calls */
304 #ifdef ALPHA
305 int osf_statfs();
306 int osf_fstatfs();
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();
314 int sys_osf_wait4();
315 #endif
316
317 #ifndef SYS_waitid
318 # ifdef I386
319 #  define SYS_waitid 284
320 # elif defined ALPHA
321 #  define SYS_waitid 438
322 # elif defined ARM
323 #  define SYS_waitid (NR_SYSCALL_BASE + 280)
324 # elif defined IA64
325 #  define SYS_waitid 1270
326 # elif defined M68K
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
332 # elif defined SH64
333 #  define SYS_waitid 312
334 # elif defined SH64
335 #  define SYS_waitid 312
336 # elif defined SH
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
342 # endif
343 #endif
344
345 #if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
346         !defined(__ARM_EABI__)
347 # ifdef IA64
348 /*
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.
352  */
353 #  define SYS_socketcall        102
354
355 #  undef SYS_socket
356 #  undef SYS_bind
357 #  undef SYS_connect
358 #  undef SYS_listen
359 #  undef SYS_accept
360 #  undef SYS_getsockname
361 #  undef SYS_getpeername
362 #  undef SYS_socketpair
363 #  undef SYS_send
364 #  undef SYS_recv
365 #  undef SYS_sendto
366 #  undef SYS_recvfrom
367 #  undef SYS_shutdown
368 #  undef SYS_setsockopt
369 #  undef SYS_getsockopt
370 #  undef SYS_sendmsg
371 #  undef SYS_recvmsg
372 # endif /* IA64 */
373 # if defined(SPARC) || defined(SPARC64)
374 #  define SYS_socket_subcall    353
375 # else
376 #  define SYS_socket_subcall    400
377 # endif
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)
397
398 #define SYS_socket_nsubcalls    20
399 #endif /* !(ALPHA || MIPS || HPPA) */
400
401 #if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
402         !defined(__ARM_EABI__)
403 # ifdef IA64
404    /*
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.
410    */
411 #  undef SYS_ipc
412 #  define SYS_ipc               117
413 #  undef SYS_semop
414 #  undef SYS_semget
415 #  undef SYS_semctl
416 #  undef SYS_semtimedop
417 #  undef SYS_msgsnd
418 #  undef SYS_msgrcv
419 #  undef SYS_msgget
420 #  undef SYS_msgctl
421 #  undef SYS_shmat
422 #  undef SYS_shmdt
423 #  undef SYS_shmget
424 #  undef SYS_shmctl
425 # endif /* IA64 */
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)
439
440 #define SYS_ipc_nsubcalls       25
441 #endif /* !(ALPHA || MIPS || HPPA) */
442
443 #if defined SYS_ipc_subcall && !defined SYS_ipc
444 # define SYS_ipc SYS_ipc_subcall
445 #endif
446 #if defined SYS_socket_subcall && !defined SYS_socketcall
447 # define SYS_socketcall SYS_socket_subcall
448 #endif
449
450 #ifdef IA64
451   /*
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.
455    */
456 # define SYS_fork       2
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
462 #endif /* IA64 */
463
464 #if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
465 int sys_getpagesize();
466 #endif
467
468 #ifdef IA64
469 /* STREAMS stuff */
470 int sys_getpmsg();
471 int sys_putpmsg();
472 #endif
473
474 #ifdef MIPS
475 int sys_sysmips();
476 #endif
477
478 #if defined M68K || defined SH
479 int sys_cacheflush();
480 #endif
481
482 #ifdef POWERPC
483 int sys_subpage_prot();
484 #endif
485
486 #ifdef BFIN
487 int sys_cacheflush();
488 int sys_sram_alloc();
489 #endif
490
491 #if defined SPARC || defined SPARC64
492 #include "sparc/syscall1.h"
493 int sys_execv();
494 int sys_getmsg();
495 int sys_msgsys();
496 int sys_putmsg();
497 int sys_semsys();
498 int sys_shmsys();
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)
516 #endif