Added comment in SYNOPSIS to note that syscall(2) may be

preferable over _syscallN (see intro(2)).
This commit is contained in:
Michael Kerrisk 2006-03-16 00:50:08 +00:00
parent cb2431bf34
commit 16718a1c3d
12 changed files with 23 additions and 1 deletions

View File

@ -44,9 +44,12 @@ clone \- create a child process
.sp
.BI "_syscall5(int, " clone ", int, " flags ", void *, " child_stack ,
.br
.br
.BI " int *, " parent_tidptr ", struct user_desc *, " newtls ,
.br
.BI " int *, " child_tidptr )
.sp
/* Using \fBsyscall\fP(2) may be preferable; see \fBintro\fP(2) */
.SH DESCRIPTION
.BR clone ()
creates a new process, in a manner similar to

View File

@ -36,6 +36,7 @@ getdents \- get directory entries
.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

View File

@ -25,6 +25,7 @@
.SH NAME
gettid \- get thread identification
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.br
.B #include <linux/unistd.h>
@ -32,7 +33,9 @@ gettid \- get thread identification
.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);
.SH DESCRIPTION
\fBgettid\fP() returns the thread ID of the current process. This is equal

View File

@ -38,6 +38,7 @@ _llseek \- reposition read/write file offset
.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) */
.sp
.BI "int _llseek(unsigned int " fd ", unsigned long " offset_high ,
.BI " unsigned long " offset_low ", loff_t *" result ,

View File

@ -39,6 +39,7 @@ mmap2 \- map files or devices into memory
.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 );

View File

@ -26,15 +26,19 @@
.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 ", unsigned long, " bytecount )
.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
.SH DESCRIPTION
.BR modify_ldt ()
reads or writes the local descriptor table (ldt) for a process.

View File

@ -13,6 +13,7 @@ pivot_root \- change the root file system
.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

View File

@ -93,6 +93,7 @@ quotactl \- manipulate disk quota
.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

@ -38,6 +38,7 @@ readdir \- read directory entry
.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 );

View File

@ -29,6 +29,7 @@
.SH NAME
sysctl \- read/write system parameters
.SH SYNOPSIS
.nf
.B #include <unistd.h>
.br
.B #include <linux/unistd.h>
@ -38,8 +39,10 @@ sysctl \- read/write system parameters
.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
.SH DESCRIPTION
The
.BR _sysctl ()

View File

@ -41,6 +41,7 @@ syslog, klogctl \- read and/or clear kernel message ring buffer; set console_log
.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

View File

@ -35,10 +35,12 @@ tkill, tgkill \- send a signal to a single process
.B #include <errno.h>
.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);
.fi