Update these pages to reflect the fact that the _syscallN() macros have

gone away.
This commit is contained in:
Michael Kerrisk 2007-05-26 15:22:28 +00:00
parent f1b85fe3a8
commit c12fd10dcb
14 changed files with 82 additions and 138 deletions

View File

@ -32,7 +32,7 @@
.\" 2005-05-10, mtk, added CLONE_SYSVSEM, CLONE_UNTRACED, CLONE_STOPPED.
.\" 2005-05-17, mtk, Substantially enhanced discussion of CLONE_THREAD.
.\"
.TH CLONE 2 2005-05-17 "Linux 2.6" "Linux Programmer's Manual"
.TH CLONE 2 2007-06-01 "Linux 2.6" "Linux Programmer's Manual"
.SH NAME
clone \- create a child process
.SH SYNOPSIS

View File

@ -24,7 +24,7 @@
.\" Modified 22 July 1995 by Michael Chastain <mec@duracef.shout.net>:
.\" Derived from 'readdir.2'.
.\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
.TH GETDENTS 2 1995-07-22 "Linux 1.3.6" "Linux Programmer's Manual"
.TH GETDENTS 2 2007-06-01 "Linux 1.3.6" "Linux Programmer's Manual"
.SH NAME
getdents \- get directory entries
.SH SYNOPSIS
@ -35,9 +35,6 @@ getdents \- get directory entries
.B #include <linux/unistd.h>
.B #include <errno.h>
.sp
.B _syscall3(int, getdents, uint, fd, struct dirent *, dirp, uint, count)
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.sp
.BI "int getdents(unsigned int " fd ", struct dirent *" dirp ", unsigned int " count );
.fi
.SH DESCRIPTION
@ -114,6 +111,9 @@ File descriptor does not refer to a directory.
.SH "CONFORMING TO"
SVr4.
.\" SVr4 documents additional ENOLINK, EIO error conditions.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
.SH "SEE ALSO"
.BR readdir (2),
.BR readdir (3)

View File

@ -21,22 +21,15 @@
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.TH GETTID 2 2003-02-01 "Linux 2.4.20" "Linux Programmer's Manual"
.TH GETTID 2 2007-06-01 "Linux 2.4.20" "Linux Programmer's Manual"
.SH NAME
gettid \- get thread identification
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.br
.B #include <linux/unistd.h>
.br
.B #include <errno.h>
.sp
.B _syscall0(pid_t, gettid)
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.sp
.fi
.B pid_t gettid(void);
.fi
.SH DESCRIPTION
.BR gettid ()
returns the thread ID of the current process.
@ -57,6 +50,9 @@ This call is always successful.
.BR gettid ()
is Linux specific and should not be used in programs that
are intended to be portable.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
.SH "SEE ALSO"
.BR clone (2),
.BR fork (2),

View File

@ -22,19 +22,11 @@
.\" with various additions by Michael Kerrisk <mtk-manpages@gmx.net>
.\"
.\"
.TH IOPRIO_GET 2 2006-04-27 "Linux" "Linux Programmer's Manual"
.TH IOPRIO_GET 2 2007-06-01 "Linux" "Linux Programmer's Manual"
.SH NAME
ioprio_get, ioprio_set \- get/set I/O scheduling class and priority
.SH SYNOPSIS
.nf
.B #include <errno.h>
.B #include <linux/unistd.h>
.sp
.B _syscall2(int, ioprio_get, int, which, int, who);
.B _syscall3(int, ioprio_set, int, which, int, who, int, ioprio);
.RB " /* Using " syscall "(2) might be preferable; see " intro \
"(2) */"
.sp
.BI "int ioprio_get(int " which ", int " who );
.BI "int ioprio_set(int " which ", int " who ", int " ioprio );
.fi
@ -192,6 +184,9 @@ kernel 2.6.13.
.SH "CONFORMING TO"
These system calls are Linux specific.
.SH NOTES
Glibc does not provide wrapper for these system calls; call them using
.BR syscall (2).
These system calls only have an effect when used
in conjunction with an I/O scheduler that supports I/O priorities.
As at kernel 2.6.17 the only such scheduler is the Completely Fair Queuing

View File

@ -23,19 +23,13 @@
.\" Written 10 June 1995 by Andries Brouwer <aeb@cwi.nl>
.\" Modified Thu Oct 31 15:16:23 1996 by Eric S. Raymond <esr@thyrsus.com>
.\"
.TH LLSEEK 2 1995-06-10 "Linux 1.2.9" "Linux Programmer's Manual"
.TH LLSEEK 2 2007-06-01 "Linux 1.2.9" "Linux Programmer's Manual"
.SH NAME
_llseek \- reposition read/write file offset
.SH SYNOPSIS
.nf
.B #include <unistd.h>
.B #include <sys/types.h>
.B #include <linux/unistd.h>
.B #include <errno.h>
.sp
.B _syscall5(int, _llseek, unsigned int, fd, unsigned long, hi,
.B " " unsigned long, lo, loff_t *, res, unsigned int, wh)
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.B #include <unistd.h>
.sp
.BI "int _llseek(unsigned int " fd ", unsigned long " offset_high ,
.BI " unsigned long " offset_low ", loff_t *" result ,
@ -81,6 +75,9 @@ is invalid.
.SH "CONFORMING TO"
This function is Linux specific, and should not be used in programs
intended to be portable.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
.SH "SEE ALSO"
.BR lseek (2),
.BR lseek64 (3)

View File

@ -26,20 +26,12 @@
.\" Added description of mmap2
.\" Modified, 2004-11-25, mtk -- removed stray #endif in prototype
.\"
.TH MMAP2 2 2002-01-31 "Linux 2.3.31" "Linux Programmer's Manual"
.TH MMAP2 2 2007-06-01 "Linux 2.3.31" "Linux Programmer's Manual"
.SH NAME
mmap2 \- map files or devices into memory
.SH SYNOPSIS
.nf
.B #include <sys/mman.h>
.br
.B #include <syscall.h>
.br
.B #include <errno.h>
.sp
.BI "_syscall6(void *, " mmap2 ", void *, " start ", size_t, " length ,
.BI " int, " prot ", int, " flags ", int, " fd ", off_t, " pgoffset )
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.sp
.BI "void *mmap2(void *" start ", size_t " length ", int " prot ,
.BI " int " flags ", int " fd ", off_t " pgoffset );
@ -71,6 +63,9 @@ data from userspace.
.SH "CONFORMING TO"
This system call is Linux specific.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
.BR mmap2 ()
is available since Linux 2.3.31.
It is Linux specific, and should be avoided in portable applications.

View File

@ -22,20 +22,12 @@
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.TH MODIFY_LDT 2 1995-07-22 "Linux 1.3.6" "Linux Programmer's Manual"
.TH MODIFY_LDT 2 2007-06-01 "Linux 1.3.6" "Linux Programmer's Manual"
.SH NAME
modify_ldt \- get or set ldt
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.br
.B #include <linux/unistd.h>
.br
.B #include <errno.h>
.sp
.BI "_syscall3(int, modify_ldt, int, " func ", void *, " ptr ,
.BI " unsigned long, " bytecount )
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.sp
.BI "int modify_ldt(int " "func" ", void *" "ptr" ", unsigned long " "bytecount" );
.fi
@ -106,5 +98,8 @@ is neither 0 nor 1.
.SH "CONFORMING TO"
This call is Linux specific and should not be used in programs intended
to be portable.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
.SH "SEE ALSO"
.BR vm86 (2)

View File

@ -20,20 +20,14 @@
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.TH MQ_GETSETATTR 2 2006-05-14 "Linux 2.6.16" "Linux Programmer's Manual"
.TH MQ_GETSETATTR 2 2007-06-01 "Linux 2.6.16" "Linux Programmer's Manual"
.SH NAME
mq_getsetattr \- get/set message queue attributes
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.br
.B #include <linux/unistd.h>
.br
.B #include <errno.h>
.B #include <mqueue.h>
.sp
.B "_syscall3(mqd_t, mqdes, struct mq_attr *, newattr,
.B " struct mq_attr *, oldattr);
/* Or use \fBsyscall\fP(2); see \fBintro\fP(2) */
.BI "mqd_t mq_getsetattr(mqd_t " mqdes ", struct mq_attr *" newattr ","
.BI " struct mq_attr *" oldattr );
.fi
@ -49,6 +43,10 @@ see the description of
.BR mq_setattr (3).
.SH CONFORMING TO
This interface is non-standard; avoid its use.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
(Actually, never call it unless you are writing a libc!)
.SH "SEE ALSO"
.BR mq_getattr (3),
.BR mq_overview (7)

View File

@ -4,17 +4,10 @@
.\" Written 2000-02-23 by Werner Almesberger
.\" Modified 2004-06-17 Michael Kerrisk <mtk-manpages@gmx.net>
.\"
.TH PIVOT_ROOT 2 2004-06-17 "Linux 2.6.7" "Linux Programmer's Manual"
.TH PIVOT_ROOT 2 2007-06-01 "Linux 2.6.7" "Linux Programmer's Manual"
.SH NAME
pivot_root \- change the root file system
.SH SYNOPSIS
.B #include <linux/unistd.h>
.br
.B #include <errno.h>
.sp
.B _syscall2(int,pivot_root,const char *,new_root,const char *,put_old)
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.sp
.BI "int pivot_root(const char *" new_root ", const char *" put_old );
.SH DESCRIPTION
.BR pivot_root ()
@ -137,6 +130,9 @@ Some of the more obscure uses of
.BR pivot_root ()
may quickly lead to
insanity.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
.SH "SEE ALSO"
.BR chdir (2),
.BR chroot (2),

View File

@ -75,7 +75,7 @@
.\" Q_XQUOTASYNC
.\" Q_XSETQLIM
.\"
.TH QUOTACTL 2 1996-04-14 "Linux 1.3.88" "Linux Programmer's Manual"
.TH QUOTACTL 2 2007-06-01 "Linux 1.3.88" "Linux Programmer's Manual"
.SH NAME
quotactl \- manipulate disk quota
.SH SYNOPSIS
@ -86,13 +86,6 @@ quotactl \- manipulate disk quota
.sp
.BI "int quotactl(int " cmd ", const char *" special ", int " id \
", caddr_t " addr );
.sp
.B #include <linux/unistd.h>
.B #include <errno.h>
.sp
.BI "_syscall4(int, quotactl, int, " cmd ", const char *, " special ,
.BI " int, " id ", caddr_t, " addr )
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.fi
.SH DESCRIPTION
The quota system defines for each user and/or group a soft limit

View File

@ -25,19 +25,13 @@
.\" In 1.3.X, returns only one entry each time; return value is different.
.\" Modified 2004-12-01, mtk, fixed headers listed in SYNOPSIS
.\"
.TH READDIR 2 1995-07-22 "Linux 1.3.6" "Linux Programmer's Manual"
.TH READDIR 2 2007-06-01 "Linux 1.3.6" "Linux Programmer's Manual"
.SH NAME
readdir \- read directory entry
.SH SYNOPSIS
.nf
.B #include <linux/types.h>
.B #include <linux/dirent.h>
.B #include <linux/unistd.h>
.B #include <errno.h>
.sp
.B _syscall3(int, readdir, unsigned int, fd, struct dirent *, dirp,
.B " unsigned int, count)"
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.sp
.BI "int readdir(unsigned int " fd ", struct dirent *" dirp ","
.BI " unsigned int " count );
@ -115,6 +109,9 @@ No such directory.
File descriptor does not refer to a directory.
.SH "CONFORMING TO"
This system call is Linux specific.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
.SH "SEE ALSO"
.BR getdents (2),
.BR readdir (3)

View File

@ -25,21 +25,14 @@
.\" Modified Tue Oct 22 22:28:41 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified Mon Jan 5 20:31:04 1998 by aeb.
.\"
.TH SYSCTL 2 1996-04-11 "Linux 1.3.85" "Linux Programmer's Manual"
.TH SYSCTL 2 2007-06-01 "Linux 1.3.85" "Linux Programmer's Manual"
.SH NAME
sysctl \- read/write system parameters
.SH SYNOPSIS
.nf
.B #include <unistd.h>
.br
.B #include <linux/unistd.h>
.br
.B #include <linux/sysctl.h>
.br
.B #include <errno.h>
.sp
.B _syscall1(int, _sysctl, struct __sysctl_args *, args)
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.sp
.BI "int _sysctl(struct __sysctl_args *" args );
.fi
@ -123,36 +116,44 @@ It is not yet possible to change operating system by writing to
.IR /proc/sys/kernel/ostype .
.SH EXAMPLE
.nf
#include <linux/unistd.h>
#include <linux/types.h>
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/sysctl.h>
_syscall1(int, _sysctl, struct __sysctl_args *, args);
int sysctl(int *name, int nlen, void *oldval, size_t *oldlenp,
void *newval, size_t newlen)
{
struct __sysctl_args args = { name, nlen, oldval, oldlenp,
newval, newlen };
return _sysctl(&args);
}
int _sysctl(struct __sysctl_args *args );
#define SIZE(x) sizeof(x)/sizeof(x[0])
#define OSNAMESZ 100
char osname[OSNAMESZ];
int osnamelth;
int name[] = { CTL_KERN, KERN_OSTYPE };
int
main(void)
{
struct __sysctl_args args;
char osname[OSNAMESZ];
size_t osnamelth;
int name[] = { CTL_KERN, KERN_OSTYPE };
memset(&args, 0, sizeof(struct __sysctl_args));
args.name = name;
args.nlen = sizeof(name)/sizeof(name[0]);
args.oldval = osname;
args.oldlenp = &osnamelth;
osnamelth = sizeof(osname);
if (sysctl(name, SIZE(name), osname, &osnamelth, 0, 0))
perror("sysctl");
else
printf("This machine is running %*s\en", osnamelth, osname);
if (syscall(SYS__sysctl, &args) == -1) {
perror("_sysctl");
exit(EXIT_FAILURE);
}
printf("This machine is running %*s\n", osnamelth, osname);
exit(EXIT_SUCCESS);
}
.fi
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
.SH "SEE ALSO"
.BR proc (5)

View File

@ -21,35 +21,25 @@
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Written 11 June 1995 by Andries Brouwer <aeb@cwi.nl>
.TH SYSLOG 2 2001-11-25 "Linux 1.2.9" "Linux Programmer's Manual"
.TH SYSLOG 2 2007-06-01 "Linux 1.2.9" "Linux Programmer's Manual"
.SH NAME
syslog, klogctl \- read and/or clear kernel message ring buffer;
set console_loglevel
.SH SYNOPSIS
.nf
.BI "int syslog(int " type ", char *" bufp ", int " len );
.B " /* No wrapper provided in glibc */
.sp
/* The glibc interface */
.br
.B "#include <sys/klog.h>"
.sp
.BI "int klogctl(int " type ", char *" bufp ", int " len );
.sp
/* The handcrafted system call */
.br
.B #include <unistd.h>
.br
.B #include <linux/unistd.h>
.br
.B #include <errno.h>
.sp
.B _syscall3(int, syslog, int, type, char *, bufp, int, len)
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.sp
.BI "int syslog(int " type ", char *" bufp ", int " len );
.fi
.SH DESCRIPTION
If you need the libc function
.BR syslog (),
(that talks to
.BR syslog ()
(which talks to
.BR syslogd (8)),
then look at
.BR syslog (3).

View File

@ -23,26 +23,14 @@
.\"
.\" 2004-05-31, added tgkill, ahu, aeb
.\"
.TH TKILL 2 2004-05-31 "Linux 2.6.6" "Linux Programmer's Manual"
.TH TKILL 2 2007-06-01 "Linux 2.6.6" "Linux Programmer's Manual"
.SH NAME
tkill, tgkill \- send a signal to a single process
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.br
.B #include <linux/unistd.h>
.br
.B #include <errno.h>
.BI "int tkill(int " tid ", int " sig );
.sp
.B "_syscall2(int, tkill, int, tid, int, sig)"
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.sp
.B int tkill(int tid, int sig);
.sp
.B "_syscall3(int, tgkill, int, tgid, int, tid, int, sig)"
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.sp
.B int tgkill(int tgid, int tid, int sig);
.BI "int tgkill(int " tgid ", int " tid ", int " sig );
.fi
.SH DESCRIPTION
The
@ -101,6 +89,9 @@ and
.BR tgkill ()
are Linux specific and should not be used
in programs that are intended to be portable.
.SH NOTES
Glibc does not provide wrapper for these system calls; call them using
.BR syscall (2).
.SH "SEE ALSO"
.BR gettid (2),
.BR kill (2)