(submitted through bug #196352). - Add man-pages-2.51-sched_setaffinity.patch, fixing the prototypes. - Remove sccs-related man pages. - Add man-pages-2.55-syscalls-2.6.9.patch, updating syscalls.2 to kernel version 2.6.9. - Add man-pages-2.55-clone2.patch; s/clone2/__&/, clone2 is not exported. - Add man-pages-2.55-signal.patch; SIGRTMIN is not constant.
692 lines
16 KiB
Diff
692 lines
16 KiB
Diff
--- man-pages-2.55/man2/socketcall.2.kasal 2006-12-27 04:55:15.000000000 +0100
|
|
+++ man-pages-2.55/man2/socketcall.2 2007-06-14 21:18:48.000000000 +0200
|
|
@@ -23,7 +23,10 @@
|
|
.\" USA.
|
|
.\"
|
|
.\" Modified Tue Oct 22 22:11:53 1996 by Eric S. Raymond <esr@thyrsus.com>
|
|
-.TH SOCKETCALL 2 1995-04-15 "Linux 1.2.4" "Linux Programmer's Manual"
|
|
+.\" 2007-06-14, Stepan Kasal <skasal@redhat.com>
|
|
+.\" -- update for 2.6.9 (add recvmsg, sendmsg)
|
|
+.\"
|
|
+.TH SOCKETCALL 2 2007-06-14 "Linux 2.6.9" "Linux Programmer's Manual"
|
|
.SH NAME
|
|
socketcall \- socket system calls
|
|
.SH SYNOPSIS
|
|
@@ -53,7 +56,9 @@
|
|
.BR listen (2),
|
|
.BR recv (2),
|
|
.BR recvfrom (2),
|
|
+.BR recvmsg (2),
|
|
.BR send (2),
|
|
+.BR sendmsg (2),
|
|
.BR sendto (2),
|
|
.BR setsockopt (2),
|
|
.BR shutdown (2),
|
|
--- man-pages-2.55/man2/syscalls.2.kasal 2007-04-13 00:42:49.000000000 +0200
|
|
+++ man-pages-2.55/man2/syscalls.2 2007-06-18 16:25:38.000000000 +0200
|
|
@@ -1,6 +1,7 @@
|
|
.\" Copyright (C) 1998 Andries Brouwer (aeb@cwi.nl)
|
|
.\" Modifications for 2.2 and 2.4 Copyright (C) 2002 Ian Redfern
|
|
.\" <redferni@logica.com>
|
|
+.\" Modifications for 2.6.9 Copyright (C) 2007 Red Hat, Inc.
|
|
.\"
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
@@ -22,19 +23,22 @@
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
.\"
|
|
-.TH SYSCALLS 2 2002-01-07 "Linux 2.4" "Linux Programmer's Manual"
|
|
+.\" Modified 2007-06-14 by Stepan Kasal <skasal@redhat.com>
|
|
+.\" -- wrote script syscalls.sh
|
|
+.\" -- update for 2.6.9
|
|
+.\"
|
|
+.TH SYSCALLS 2 2007-06-14 "Linux 2.6" "Linux Programmer's Manual"
|
|
.SH NAME
|
|
none \- list of all system calls
|
|
.SH SYNOPSIS
|
|
-Linux 2.4 system calls.
|
|
+Linux 2.6 system calls.
|
|
.SH DESCRIPTION
|
|
The system call is the fundamental interface between an application
|
|
and the Linux kernel.
|
|
-As of Linux 2.4.17, there are 1100 system calls
|
|
-listed in
|
|
-.IR /usr/src/linux/include/asm-*/unistd.h .
|
|
-This man page lists those that are common to most platforms.
|
|
+As of Linux 2.6.9, there are 945 system calls;
|
|
+this man page lists those that are common to most platforms.
|
|
|
|
+.\" Use syscalls.sh when updating to a newer kernel.
|
|
_llseek(2),
|
|
_newselect(2),
|
|
_sysctl(2),
|
|
@@ -42,81 +46,121 @@
|
|
access(2),
|
|
acct(2),
|
|
adjtimex(2),
|
|
-afs_syscall,
|
|
+afs\%_syscall(2),
|
|
alarm(2),
|
|
bdflush(2),
|
|
bind(2),
|
|
-break,
|
|
+break(2),
|
|
brk(2),
|
|
-cacheflush(2),
|
|
capget(2),
|
|
capset(2),
|
|
chdir(2),
|
|
chmod(2),
|
|
-chown(2), chown32,
|
|
+chown(2),
|
|
+chown32(2),
|
|
chroot(2),
|
|
+clock\%_get\%res(2),
|
|
+clock\%_get\%time(2),
|
|
+clock\%_nanosleep(2),
|
|
+clock\%_set\%time(2),
|
|
clone(2),
|
|
close(2),
|
|
connect(2),
|
|
creat(2),
|
|
-create_module(2),
|
|
-delete_module(2),
|
|
+create\%_module(2),
|
|
+delete\%_module(2),
|
|
dup(2),
|
|
dup2(2),
|
|
+epoll\%_create(2),
|
|
+epoll\%_ctl(2),
|
|
+epoll\%_wait(2),
|
|
execve(2),
|
|
exit(2),
|
|
+exit\%_group(2),
|
|
+fadvise64(2),
|
|
+fadvise64\%_64(2),
|
|
fchdir(2),
|
|
fchmod(2),
|
|
-fchown(2), fchown32,
|
|
-fcntl(2), fcntl64,
|
|
+fchown(2),
|
|
+fchown32(2),
|
|
+fcntl(2),
|
|
+fcntl64(2),
|
|
fdatasync(2),
|
|
+fget\%xattr(2),
|
|
+flistxattr(2),
|
|
flock(2),
|
|
fork(2),
|
|
-fstat(2), fstat64,
|
|
+fremovexattr(2),
|
|
+fset\%xattr(2),
|
|
+fstat(2),
|
|
+fstat64(2),
|
|
fstatfs(2),
|
|
+fstatfs64(2),
|
|
fsync(2),
|
|
-ftime,
|
|
-ftruncate(2), ftruncate64,
|
|
+ftime(2),
|
|
+ftruncate(2),
|
|
+ftruncate64(2),
|
|
+futex(2),
|
|
get\%_kernel\%_syms(2),
|
|
get\%cwd(2),
|
|
-get\%dents(2), get\%dents64,
|
|
-get\%egid(2), get\%egid32,
|
|
-get\%euid(2), get\%euid32,
|
|
-get\%gid(2), get\%gid32,
|
|
-get\%groups(2), get\%groups32,
|
|
+get\%dents(2),
|
|
+get\%dents64(2),
|
|
+get\%egid(2),
|
|
+get\%egid32(2),
|
|
+get\%euid(2),
|
|
+get\%euid32(2),
|
|
+get\%gid(2),
|
|
+get\%gid32(2),
|
|
+get\%groups(2),
|
|
+get\%groups32(2),
|
|
get\%itimer(2),
|
|
-get\%pagesize(2),
|
|
get\%peername(2),
|
|
-get\%pmsg,
|
|
get\%pgid(2),
|
|
get\%pgrp(2),
|
|
get\%pid(2),
|
|
+get\%pmsg(2),
|
|
get\%ppid(2),
|
|
get\%priority(2),
|
|
-get\%resgid(2), get\%resgid32,
|
|
-get\%resuid(2), get\%resuid32,
|
|
+get\%resgid(2),
|
|
+get\%resgid32(2),
|
|
+get\%resuid(2),
|
|
+get\%resuid32(2),
|
|
get\%rlimit(2),
|
|
get\%rusage(2),
|
|
get\%sid(2),
|
|
get\%sockname(2),
|
|
get\%sockopt(2),
|
|
-get\%tid,
|
|
-get\%timeofday(2),
|
|
-get\%uid(2), get\%uid32,
|
|
-gtty,
|
|
-idle,
|
|
-init_module(2),
|
|
+get\%tid(2),
|
|
+get\%time\%of\%day(2),
|
|
+get\%uid(2),
|
|
+get\%uid32(2),
|
|
+get\%xattr(2),
|
|
+gtty(2),
|
|
+idle(2),
|
|
+init\%_module(2),
|
|
+io\%_cancel(2),
|
|
+io\%_destroy(2),
|
|
+io\%_get\%events(2),
|
|
+io\%_set\%up(2),
|
|
+io\%_submit(2),
|
|
ioctl(2),
|
|
-io\%perm(2),
|
|
-iopl(2),
|
|
+ioperm(2),
|
|
ipc(2),
|
|
kill(2),
|
|
-lchown(2), lchown32,
|
|
+lchown(2),
|
|
+lchown32(2),
|
|
+lget\%xattr(2),
|
|
link(2),
|
|
listen(2),
|
|
-lock,
|
|
+listxattr(2),
|
|
+llistxattr(2),
|
|
+lock(2),
|
|
+lookup\%_dcookie(2),
|
|
+lremovexattr(2),
|
|
lseek(2),
|
|
-lstat(2), lstat64,
|
|
+lset\%xattr(2),
|
|
+lstat(2),
|
|
+lstat64(2),
|
|
madvise(2),
|
|
mincore(2),
|
|
mkdir(2),
|
|
@@ -124,11 +168,21 @@
|
|
mlock(2),
|
|
mlockall(2),
|
|
mmap(2),
|
|
-modify_ldt(2),
|
|
+mmap2(2),
|
|
mount(2),
|
|
mprotect(2),
|
|
-mpx,
|
|
+mpx(2),
|
|
+mq\%_get\%setattr(2),
|
|
+mq\%_notify(2),
|
|
+mq\%_open(2),
|
|
+mq\%_timedreceive(2),
|
|
+mq\%_timedsend(2),
|
|
+mq\%_unlink(2),
|
|
mremap(2),
|
|
+msgctl(2),
|
|
+msgget(2),
|
|
+msgrcv(2),
|
|
+msgsnd(2),
|
|
msync(2),
|
|
munlock(2),
|
|
munlockall(2),
|
|
@@ -136,70 +190,97 @@
|
|
nanosleep(2),
|
|
nfsservctl(2),
|
|
nice(2),
|
|
-oldfstat, oldlstat, oldolduname, oldstat, oldumount, olduname,
|
|
+oldlstat(2),
|
|
open(2),
|
|
pause(2),
|
|
personality(2),
|
|
-phys,
|
|
pipe(2),
|
|
-pivot_root(2),
|
|
+pivot\%_root(2),
|
|
poll(2),
|
|
prctl(2),
|
|
-pread(2),
|
|
-prof, profil,
|
|
+pread64(2),
|
|
+prof(2),
|
|
+profil(2),
|
|
ptrace(2),
|
|
-putpmsg,
|
|
-pwrite(2),
|
|
-query_module(2),
|
|
+putpmsg(2),
|
|
+pwrite64(2),
|
|
+query\%_module(2),
|
|
quotactl(2),
|
|
read(2),
|
|
-readahead,
|
|
+readahead(2),
|
|
readdir(2),
|
|
readlink(2),
|
|
readv(2),
|
|
reboot(2),
|
|
-recv(2), recvfrom(2), recvmsg(2),
|
|
+recv(2),
|
|
+recvfrom(2),
|
|
+recvmsg(2),
|
|
+remap\%_file\%_pages(2),
|
|
+removexattr(2),
|
|
rename(2),
|
|
+restart\%_syscall(2),
|
|
rmdir(2),
|
|
-rt_sigaction,
|
|
-rt_sigpending,
|
|
-rt_sigprocmask,
|
|
-rt_sigqueueinfo,
|
|
-rt_sigreturn,
|
|
-rt_sigsuspend,
|
|
-rt_sigtimedwait,
|
|
-sched_\%get_\%priority_max(2),
|
|
-sched_\%get_\%priority_min(2),
|
|
-sched_\%get\%param(2),
|
|
-sched_\%get\%scheduler(2),
|
|
-sched_\%rr_\%get_\%interval(2),
|
|
-sched_\%set\%param(2),
|
|
-sched_\%set\%scheduler(2),
|
|
-sched_\%yield(2),
|
|
-security,
|
|
+rt_sig\%action(2),
|
|
+rt_sig\%pending(2),
|
|
+rt_sig\%procmask(2),
|
|
+rt_sig\%queueinfo(2),
|
|
+rt_sig\%return(2),
|
|
+rt_sig\%suspend(2),
|
|
+rt_sig\%timedwait(2),
|
|
+sched\%_get\%_priority\%_max(2),
|
|
+sched\%_get\%_priority\%_min(2),
|
|
+sched\%_get\%affinity(2),
|
|
+sched\%_get\%param(2),
|
|
+sched\%_get\%scheduler(2),
|
|
+sched\%_rr\%_get\%_interval(2),
|
|
+sched\%_set\%affinity(2),
|
|
+sched\%_set\%param(2),
|
|
+sched\%_set\%scheduler(2),
|
|
+sched\%_yield(2),
|
|
select(2),
|
|
+semctl(2),
|
|
+semget(2),
|
|
+semop(2),
|
|
+semtimedop(2),
|
|
+send(2),
|
|
sendfile(2),
|
|
-send(2), sendmsg(2), sendto(2),
|
|
+sendfile64(2),
|
|
+sendmsg(2),
|
|
+sendto(2),
|
|
+set\%_tid\%_address(2),
|
|
set\%domainname(2),
|
|
-set\%fsgid(2), set\%fsgid32,
|
|
-set\%fsuid(2), set\%fsuid32,
|
|
-set\%gid(2), set\%gid32,
|
|
-set\%groups(2), set\%groups32,
|
|
+set\%fsgid(2),
|
|
+set\%fsgid32(2),
|
|
+set\%fsuid(2),
|
|
+set\%fsuid32(2),
|
|
+set\%gid(2),
|
|
+set\%gid32(2),
|
|
+set\%groups(2),
|
|
+set\%groups32(2),
|
|
set\%hostname(2),
|
|
set\%itimer(2),
|
|
set\%pgid(2),
|
|
set\%priority(2),
|
|
-set\%regid(2), set\%regid32,
|
|
-set\%resgid(2), set\%resgid32,
|
|
-set\%resuid(2), set\%resuid32,
|
|
-set\%reuid(2), set\%reuid32,
|
|
+set\%regid(2),
|
|
+set\%regid32(2),
|
|
+set\%resgid(2),
|
|
+set\%resgid32(2),
|
|
+set\%resuid(2),
|
|
+set\%resuid32(2),
|
|
+set\%reuid(2),
|
|
+set\%reuid32(2),
|
|
set\%rlimit(2),
|
|
set\%sid(2),
|
|
set\%sockopt(2),
|
|
-set\%timeofday(2),
|
|
-set\%uid(2), set\%uid32,
|
|
-setup(2),
|
|
-sgetmask(2),
|
|
+set\%time\%of\%day(2),
|
|
+set\%uid(2),
|
|
+set\%uid32(2),
|
|
+set\%xattr(2),
|
|
+sget\%mask(2),
|
|
+shmat(2),
|
|
+shmctl(2),
|
|
+shmdt(2),
|
|
+shmget(2),
|
|
shutdown(2),
|
|
sigaction(2),
|
|
sigaltstack(2),
|
|
@@ -211,11 +292,13 @@
|
|
socket(2),
|
|
socketcall(2),
|
|
socketpair(2),
|
|
-ssetmask(2),
|
|
-stat(2), stat64,
|
|
+sset\%mask(2),
|
|
+stat(2),
|
|
+stat64(2),
|
|
statfs(2),
|
|
+statfs64(2),
|
|
stime(2),
|
|
-stty,
|
|
+stty(2),
|
|
swapoff(2),
|
|
swapon(2),
|
|
symlink(2),
|
|
@@ -223,51 +306,80 @@
|
|
sysfs(2),
|
|
sysinfo(2),
|
|
syslog(2),
|
|
+tgkill(2),
|
|
time(2),
|
|
+timer\%_create(2),
|
|
+timer\%_delete(2),
|
|
+timer\%_get\%overrun(2),
|
|
+timer\%_get\%time(2),
|
|
+timer\%_set\%time(2),
|
|
times(2),
|
|
-truncate(2), truncate64,
|
|
-ulimit,
|
|
+tkill(2),
|
|
+truncate(2),
|
|
+truncate64(2),
|
|
+uget\%rlimit(2),
|
|
+ulimit(2),
|
|
umask(2),
|
|
umount(2),
|
|
+umount2(2),
|
|
uname(2),
|
|
unlink(2),
|
|
uselib(2),
|
|
ustat(2),
|
|
utime(2),
|
|
+utimes(2),
|
|
vfork(2),
|
|
vhangup(2),
|
|
-vm86(2),
|
|
-vm86old,
|
|
wait4(2),
|
|
waitpid(2),
|
|
write(2),
|
|
writev(2).
|
|
|
|
-Of the above, 9 are obsolete, namely
|
|
-getrlimit, oldfstat, oldlstat, oldolduname, oldstat, olduname,
|
|
-readdir, select and vm86old
|
|
-(see also
|
|
-.BR obsolete (2)),
|
|
-and 15 are unimplemented in the standard kernel, namely
|
|
-afs_syscall, break, ftime, getpmsg, gtty, idle, lock, mpx, phys,
|
|
-prof, profil, putpmsg, security, stty and ulimit (see also
|
|
-.BR unimplemented (2)).
|
|
+Of the above, 5 are not implemented in standard kernel, reserved for future
|
|
+or special use, namely
|
|
+afs_syscall,
|
|
+getpmsg,
|
|
+putpmsg,
|
|
+kexec_load,
|
|
+vserver.
|
|
+.
|
|
+For example, the getpmsg and putpmsg calls are for kernels patched to support streams, and
|
|
+may never be in the standard kernel.
|
|
+.
|
|
+Another 12 system calls are unimplemented obsolete calls, namely
|
|
+break,
|
|
+create_module,
|
|
+ftime,
|
|
+get_kernel_syms,
|
|
+gtty,
|
|
+lock,
|
|
+mpx,
|
|
+prof,
|
|
+profil,
|
|
+stty,
|
|
+sys_query_module,
|
|
+ulimit.
|
|
+.
|
|
However,
|
|
.BR ftime (3),
|
|
-.BR profil (3)
|
|
+.BR profil (3),
|
|
and
|
|
.BR ulimit (3)
|
|
exist as library routines.
|
|
-The slot for phys is in use since 2.1.116 for umount;
|
|
+.
|
|
+Another unimplemented obsolete system call was phys;
|
|
+but its slot is in use since 2.1.116 for umount, so
|
|
phys will never be implemented.
|
|
-The getpmsg and putpmsg calls are for
|
|
-kernels patched to support streams, and may never be in the standard
|
|
-kernel.
|
|
-The security call is for future use.
|
|
+.
|
|
+(See also
|
|
+.BR obsolete (2)
|
|
+and
|
|
+.BR unimplemented (2).)
|
|
+
|
|
|
|
Roughly speaking, the code belonging to the system call
|
|
with number __NR_xxx defined in
|
|
-.I /usr/include/asm/unistd.h
|
|
+.I /usr/include/asm-*/unistd.h
|
|
can be found in the kernel source in the routine
|
|
.IR sys_xxx ().
|
|
(The dispatch table for i386 can be found in
|
|
@@ -279,16 +391,16 @@
|
|
proprietary OS emulation, such as parisc, sparc, sparc64 and alpha,
|
|
there are many additional system calls; mips64 also contains a full
|
|
set of 32-bit system calls.
|
|
-Below the details for Linux 2.4.17.
|
|
|
|
The defines __NR_oldstat and __NR_stat refer to the routines
|
|
-sys_stat() and sys_newstat(), and similarly for
|
|
+.IR sys_stat "() and " sys_newstat (),
|
|
+and likewise for
|
|
.I fstat
|
|
and
|
|
.IR lstat .
|
|
Similarly, the defines __NR_oldolduname, __NR_olduname and
|
|
-__NR_uname refer to the routines sys_olduname(), sys_uname()
|
|
-and sys_newuname().
|
|
+__NR_uname refer to the routines
|
|
+.IR sys_olduname "(), " sys_uname "(), and " sys_newuname ().
|
|
Thus, __NR_stat and __NR_uname have always referred to the latest
|
|
version of the system call, and the older ones are for backward
|
|
compatibility.
|
|
@@ -316,7 +428,7 @@
|
|
superseded by sys_getdents().
|
|
|
|
On many platforms, including i386, socket calls are all multiplexed
|
|
-through socketcall() and System V IPC calls through ipc().
|
|
+through socketcall(2) and System V IPC calls through ipc(2).
|
|
|
|
On newer platforms that only have 64-bit file access and 32-bit uids
|
|
(e.g. alpha, ia64, s390x) there are no *64 or *32 calls.
|
|
@@ -328,3 +440,4 @@
|
|
*32 calls were added for kernel 2.4, as were the new versions of
|
|
getrlimit and mmap, and the new calls pivot_root, mincore, madvise,
|
|
security, gettid and readahead.
|
|
+The security call is no longer present in 2.6 kernels.
|
|
--- man-pages-2.55/man2/ipc.2.kasal 2007-05-12 11:06:04.000000000 +0200
|
|
+++ man-pages-2.55/man2/ipc.2 2007-06-14 20:47:47.000000000 +0200
|
|
@@ -23,7 +23,10 @@
|
|
.\" USA.
|
|
.\"
|
|
.\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
|
|
-.TH IPC 2 1995-04-15 "Linux 1.2.4" "Linux Programmer's Manual"
|
|
+.\" 2007-06-14, Stepan Kasal <skasal@redhat.com>
|
|
+.\" -- update for 2.6.9 (add semtimedop)
|
|
+.\"
|
|
+.TH IPC 2 2007-06-14 "Linux 2.6.9" "Linux Programmer's Manual"
|
|
.SH NAME
|
|
ipc \- System V IPC system calls
|
|
.SH SYNOPSIS
|
|
@@ -55,6 +58,7 @@
|
|
.BR semctl (2),
|
|
.BR semget (2),
|
|
.BR semop (2),
|
|
+.BR semtimedop (2),
|
|
.BR shmat (2),
|
|
.BR shmctl (2),
|
|
.BR shmdt (2),
|
|
--- man-pages-2.55/scripts/syscalls.sh.kasal 2007-06-18 16:30:54.000000000 +0200
|
|
+++ man-pages-2.55/scripts/syscalls.sh 2007-06-18 16:40:30.000000000 +0200
|
|
@@ -0,0 +1,136 @@
|
|
+#!/bin/sh
|
|
+#
|
|
+# This script examines Linux source tree and prints a summary about
|
|
+# the system calls.
|
|
+#
|
|
+# Copyright (C) 2007 Red Hat, Inc.
|
|
+#
|
|
+# Written by Stepan Kasal <skasal@redhat.com>
|
|
+#
|
|
+# This script is free software; Red Hat, Inc. gives unlimited
|
|
+# permission to copy and/or distribute it, with or without
|
|
+# modifications, as long as this notice is preserved.
|
|
+#
|
|
+# This program is distributed in the hope that it will be useful,
|
|
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
+# PARTICULAR PURPOSE.
|
|
+
|
|
+# The root of the source tree:
|
|
+#src_tree=/usr/src/linux
|
|
+src_tree=linux-2.6.9
|
|
+
|
|
+export LC_ALL=C
|
|
+
|
|
+awk '
|
|
+BEGIN {
|
|
+ # First, remove "#define ":
|
|
+ re_define = "^[[:blank:]]*#[[:blank:]]*define[[:blank:]]+"
|
|
+
|
|
+ # the remaining definition of a symbol:
|
|
+ re_sym1 = "([_[:alnum:]]+)[[:blank:]].*$"
|
|
+
|
|
+ # a general symbol:
|
|
+ re_symbol = re_define re_sym1
|
|
+
|
|
+ # a socket symbol in include/linux/net.h:
|
|
+ re_sys_symbol = re_define "SYS_" re_sym1
|
|
+
|
|
+ # a special variant for syscall number definitions:
|
|
+ re_nr = re_define "__NR_" re_sym1
|
|
+
|
|
+ # a special case of the previous, a redefine:
|
|
+ # Note: in linux 2.6.9, this matches only the "_exit" alias to "exit".
|
|
+ re_nr_redefine = re_define "__NR_([_[:alnum:]]+)[[:blank:]]+__NR_[_[:alnum:]]+.*$"
|
|
+}
|
|
+
|
|
+# net.h -- socket defines:
|
|
+FILENAME ~ /\/net\.h$/ && $0 ~ re_sys_symbol {
|
|
+ symbol = gensub(re_sys_symbol, "\\1", 1)
|
|
+ socket_syscall[tolower(symbol)]
|
|
+}
|
|
+
|
|
+# ipc.h defines:
|
|
+FILENAME ~ /\/ipc\.h$/ && $0 ~ re_symbol {
|
|
+ symbol = gensub(re_symbol, "\\1", 1)
|
|
+
|
|
+ # A comment appearing in several include/asm-*/ipc.h files says:
|
|
+ # "/* Used by the DIPC package, try and avoid reusing it */"
|
|
+ # Thus I guess it is OK to omit it:
|
|
+ if (symbol == "DIPC") next
|
|
+
|
|
+ ipc_syscall[tolower(symbol)]
|
|
+}
|
|
+
|
|
+# unistd.h syscall defines:
|
|
+FILENAME ~ /\/unistd\.h$/ &&
|
|
+ $0 ~ re_nr &&
|
|
+ $0 !~ re_nr_redefine {
|
|
+ syscall=gensub(re_nr,"\\1",1)
|
|
+ # This is not a syscall:
|
|
+ if (syscall == "syscall_max") next
|
|
+ arch=gensub(/.*\/asm-(.*)\/unistd\.h/,"\\1",1,FILENAME)
|
|
+ if(!(arch in arch_list)) {
|
|
+ n_arch++
|
|
+ arch_list[arch]
|
|
+ }
|
|
+ a[syscall]
|
|
+ # beware, the syscall can be named several times in a file:
|
|
+ list[syscall] = list[syscall] " "arch
|
|
+}
|
|
+
|
|
+# The main body:
|
|
+END {
|
|
+ handle_multi("socketcall", socket_syscall)
|
|
+ handle_multi("ipc", ipc_syscall)
|
|
+ report()
|
|
+}
|
|
+
|
|
+function handle_multi(multi_syscall, sys_array, i,n,s) {
|
|
+ printf("%s multiplexor, check man2/%s.2:\n\n",
|
|
+ multi_syscall, multi_syscall)
|
|
+ n = asorti(sys_array)
|
|
+ for (i = 1; i <= n; i++) {
|
|
+ s = sys_array[i]
|
|
+ print ".BR", s, "(2)" (i==n ? "" : ",")
|
|
+ multiplexed[s]
|
|
+ a[s]
|
|
+ }
|
|
+ print ""
|
|
+ # and make sure that report() lists the multiplexing call, too:
|
|
+ multiplexed[multi_syscall]
|
|
+}
|
|
+
|
|
+function report( n,i) {
|
|
+ n = asorti(a)
|
|
+ print "Total number of syscalls:", n
|
|
+ print ""
|
|
+ for (i = 1; i <= n; i++)
|
|
+ if (common_to_most_platforms(a[i]))
|
|
+ print format(a[i]) "(2)" (i==n ? "." : ",")
|
|
+}
|
|
+
|
|
+function common_to_most_platforms(syscall, i, arch_list, arch_a, num) {
|
|
+ if (syscall in multiplexed)
|
|
+ return 1
|
|
+ # These two are x86 specific, yet they are mentioned in many
|
|
+ # unistd.h files, apparently for historical reasons:
|
|
+ if (syscall == "vm86" || syscall == "iopl")
|
|
+ return 0
|
|
+ for (i = split(list[syscall], arch_list); i > 0; i--)
|
|
+ arch_a[arch_list[i]]
|
|
+ num = asort(arch_a)
|
|
+ return num > n_arch/2
|
|
+}
|
|
+
|
|
+function format(s) {
|
|
+ sub(/timeofday/,"time\\%of\\%day",s)
|
|
+ gsub(/(^.?|_)[sg]et/,"&\\%",s)
|
|
+ sub(/^rt_sig/,"&\\%",s) || gsub(/_/,"\\%_",s)
|
|
+ sub(/^\\%/, "", s)
|
|
+ gsub(/\\%(\\%)+/, "\\%", s)
|
|
+ return s
|
|
+}
|
|
+' $src_tree/include/linux/net.h \
|
|
+ $src_tree/include/asm-*/ipc.h \
|
|
+ $src_tree/include/asm-*/unistd.h
|