mirror of https://github.com/mkerrisk/man-pages
Compare commits
39 Commits
1cf69258ad
...
66c743b191
Author | SHA1 | Date |
---|---|---|
Michael Kerrisk | 66c743b191 | |
Alejandro Colomar | fac7dabcd1 | |
Alejandro Colomar | 71b08c22b5 | |
Alejandro Colomar | 8f33ee075a | |
Alejandro Colomar | 05214ec7ba | |
Alejandro Colomar | 4e8ac36900 | |
Alejandro Colomar | e393b243c0 | |
Alejandro Colomar | 3e67d1a76b | |
Alejandro Colomar | 5a24cb274f | |
Alejandro Colomar | 94df87ef9b | |
Alejandro Colomar | 46227ba213 | |
Alejandro Colomar | 13cf4fc78a | |
Alejandro Colomar | e691579150 | |
Alejandro Colomar | 10f4414ccb | |
Alejandro Colomar | bc2813df5e | |
Alejandro Colomar | a39bcd0b85 | |
Alejandro Colomar | 57d2facb78 | |
Alejandro Colomar | 0eefb56c95 | |
Alejandro Colomar | 01ee7ce9b7 | |
Alejandro Colomar | c88fc2baad | |
Alejandro Colomar | 39df5bd6bc | |
Alejandro Colomar | 3977e9ff1f | |
Alejandro Colomar | aecad91d0b | |
Alejandro Colomar | f1d0eaf52b | |
Alejandro Colomar | 5b013bd50f | |
Alejandro Colomar | 1ad9eda841 | |
Alejandro Colomar | e59830eda9 | |
Alejandro Colomar | b5c3fcdb65 | |
Alejandro Colomar | 2f4306b033 | |
Alejandro Colomar | e3e30ce1bd | |
Alejandro Colomar | acb2e04c24 | |
Alejandro Colomar | 0d961e8818 | |
Alejandro Colomar | 2f8cb589fb | |
Alejandro Colomar | 8b4c942c50 | |
Alejandro Colomar | 950d1738ef | |
Alejandro Colomar | cac89bc794 | |
Alejandro Colomar | 70f9a4edb3 | |
Alejandro Colomar | 4b63cf3ca7 | |
Alejandro Colomar | 0aa385fe25 |
|
@ -35,6 +35,11 @@ alloc_hugepages, free_hugepages \- allocate or free huge pages
|
|||
.BI "int syscall(SYS_free_hugepages, void *" addr );
|
||||
.\" asmlinkage int sys_free_hugepages(unsigned long addr);
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
glibc provides no wrappers for these system calls,
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The system calls
|
||||
.BR alloc_hugepages ()
|
||||
|
|
|
@ -34,6 +34,12 @@ arch_prctl \- set architecture-specific thread state
|
|||
.BI "int syscall(SYS_arch_prctl, int " code ", unsigned long " addr );
|
||||
.BI "int syscall(SYS_arch_prctl, int " code ", unsigned long *" addr );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
glibc provides no wrapper for
|
||||
.BR arch_prctl (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
.BR arch_prctl ()
|
||||
sets architecture-specific process or thread state.
|
||||
|
|
|
@ -28,6 +28,11 @@ capget, capset \- set/get capabilities of thread(s)
|
|||
.BI "int syscall(SYS_capset, cap_user_header_t " hdrp ,
|
||||
.BI " const cap_user_data_t " datap );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
glibc provides no wrappers for these system calls,
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
These two system calls are the raw kernel interface for getting and
|
||||
setting thread capabilities.
|
||||
|
|
|
@ -63,6 +63,12 @@ clone, __clone2, clone3 \- create a child process
|
|||
.PP
|
||||
.BI "long syscall(SYS_clone3, struct clone_args *" cl_args ", size_t " size );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
glibc provides no wrapper for
|
||||
.BR clone3 (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
These system calls
|
||||
create a new ("child") process, in a manner similar to
|
||||
|
|
|
@ -33,6 +33,12 @@ delete_module \- unload a kernel module
|
|||
.PP
|
||||
.BI "int syscall(SYS_delete_module, const char *" name ", unsigned int " flags );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
glibc provides no wrapper for
|
||||
.BR delete_module (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.BR delete_module ()
|
||||
|
|
|
@ -32,6 +32,12 @@ exit_group \- exit all threads in a process
|
|||
.PP
|
||||
.BI "noreturn void syscall(SYS_exit_group, int " status );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
glibc provides no wrapper for
|
||||
.BR exit_group (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
This system call is equivalent to
|
||||
.BR _exit (2)
|
||||
|
|
21
man2/futex.2
21
man2/futex.2
|
@ -25,18 +25,22 @@ futex \- fast user-space locking
|
|||
.SH SYNOPSIS
|
||||
.nf
|
||||
.PP
|
||||
.B #include <linux/futex.h>
|
||||
.B #include <stdint.h>
|
||||
.B #include <sys/time.h>
|
||||
.BR "#include <linux/futex.h>" " /* Definition of " FUTEX_* " constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "long futex(uint32_t *" uaddr ", int " futex_op ", uint32_t " val ,
|
||||
.BI " const struct timespec *" timeout , \
|
||||
.BI "long syscall(SYS_futex, uint32_t *" uaddr ", int " futex_op \
|
||||
", uint32_t " val ,
|
||||
.BI " const struct timespec *" timeout , \
|
||||
" \fR /* or: \fBuint32_t \fIval2\fP */"
|
||||
.BI " uint32_t *" uaddr2 ", uint32_t " val3 );
|
||||
.BI " uint32_t *" uaddr2 ", uint32_t " val3 );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR futex (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.BR futex ()
|
||||
|
@ -1695,9 +1699,6 @@ and a sixth argument was added in Linux 2.6.7.
|
|||
.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).
|
||||
.PP
|
||||
Several higher-level programming abstractions are implemented via futexes,
|
||||
including POSIX semaphores and
|
||||
various POSIX threads synchronization mechanisms
|
||||
|
|
|
@ -42,6 +42,11 @@ get_robust_list, set_robust_list \- get/set list of robust futexes
|
|||
.BI "long syscall(SYS_set_robust_list,"
|
||||
.BI " struct robust_list_head *" head ", size_t " len );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
glibc provides no wrappers for these system calls,
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
These system calls deal with per-thread robust futex lists.
|
||||
These lists are managed in user space:
|
||||
|
|
|
@ -33,19 +33,29 @@
|
|||
getdents, getdents64 \- get directory entries
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BI "long getdents(unsigned int " fd ", struct linux_dirent *" dirp ,
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "long syscall(SYS_getdents, unsigned int " fd \
|
||||
", struct linux_dirent *" dirp ,
|
||||
.BI " unsigned int " count );
|
||||
.PP
|
||||
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||
.BR "#include <dirent.h>"
|
||||
.PP
|
||||
.BI "ssize_t getdents64(int " fd ", void *" dirp ", size_t " count );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for
|
||||
.BR getdents ();
|
||||
see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR getdents (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no definition of
|
||||
.I struct linux_dirent
|
||||
in glibc; see NOTES.
|
||||
.SH DESCRIPTION
|
||||
These are not the interfaces you are interested in.
|
||||
Look at
|
||||
|
|
|
@ -35,6 +35,12 @@ getunwind \- copy the unwind data to caller's buffer
|
|||
.PP
|
||||
.BI "long syscall(SYS_getunwind, void " *buf ", size_t " buf_size );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
glibc provides no wrapper for
|
||||
.BR getunwind (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
.I Note: this system call is obsolete.
|
||||
.PP
|
||||
|
|
|
@ -38,6 +38,11 @@ init_module, finit_module \- load a kernel module
|
|||
.BI "int syscall(SYS_finit_module, int " fd ", const char *" param_values ,
|
||||
.BI " int " flags );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
glibc provides no wrappers for these system calls,
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
.BR init_module ()
|
||||
loads an ELF image into kernel space,
|
||||
|
|
|
@ -9,13 +9,18 @@
|
|||
io_destroy \- destroy an asynchronous I/O context
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BR "#include <linux/aio_abi.h>" " /* Defines needed types */"
|
||||
.BR "#include <linux/aio_abi.h>" " /* Definition of " aio_context_t " */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int io_destroy(aio_context_t " ctx_id );
|
||||
.BI "int syscall(SYS_io_destroy, aio_context_t " ctx_id );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR io_destroy (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
.IR Note :
|
||||
this page describes the raw Linux system call interface.
|
||||
|
@ -57,10 +62,7 @@ The asynchronous I/O system calls first appeared in Linux 2.5.
|
|||
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.
|
||||
You could invoke it using
|
||||
.BR syscall (2).
|
||||
But instead, you probably want to use the
|
||||
You probably want to use the
|
||||
.BR io_destroy ()
|
||||
wrapper function provided by
|
||||
.\" http://git.fedorahosted.org/git/?p=libaio.git
|
||||
|
|
|
@ -9,16 +9,20 @@
|
|||
io_getevents \- read asynchronous I/O events from the completion queue
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BR "#include <linux/aio_abi.h>" " /* Defines needed types */"
|
||||
.BR "#include <linux/time.h>" " /* Defines 'struct timespec' */"
|
||||
.BR "#include <linux/aio_abi.h>" " /* Definition of " *io_* " types */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int io_getevents(aio_context_t " ctx_id ", long " min_nr ", long " nr ,
|
||||
.BI " struct io_event *" events \
|
||||
", struct timespec *" timeout );
|
||||
.BI "int syscall(SYS_io_getevents, aio_context_t " ctx_id ,
|
||||
.BI " long " min_nr ", long " nr ", struct io_event *" events ,
|
||||
.BI " struct timespec *" timeout );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR io_getevents (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
.IR Note :
|
||||
this page describes the raw Linux system call interface.
|
||||
|
@ -94,10 +98,7 @@ The asynchronous I/O system calls first appeared in Linux 2.5.
|
|||
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.
|
||||
You could invoke it using
|
||||
.BR syscall (2).
|
||||
But instead, you probably want to use the
|
||||
You probably want to use the
|
||||
.BR io_getevents ()
|
||||
wrapper function provided by
|
||||
.\" http://git.fedorahosted.org/git/?p=libaio.git
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
ioctl_tty \- ioctls for terminals and serial lines
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B "#include <termios.h>"
|
||||
.B #include <sys/ioctl.h>
|
||||
.BR "#include <termios.h>" " /* Definition of " CLOCAL ", and"
|
||||
.BR " TC*" { FLUSH , ON , OFF "} constants */"
|
||||
.PP
|
||||
.BI "int ioctl(int " fd ", int " cmd ", ...);"
|
||||
.fi
|
||||
|
@ -119,8 +121,6 @@ Window sizes are kept in the kernel, but not used by the kernel
|
|||
update the window size when the size of the virtual console changes,
|
||||
for example, by loading a new font).
|
||||
.PP
|
||||
The following constants and structure are defined in
|
||||
.IR <sys/ioctl.h> .
|
||||
.TP
|
||||
.B TIOCGWINSZ
|
||||
Argument:
|
||||
|
|
|
@ -31,6 +31,7 @@ ioctl_userfaultfd \- create a file descriptor for handling page faults in user
|
|||
space
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BR "#include <linux/userfaultfd.h>" " /* Definition of " UFFD* " constants */"
|
||||
.B #include <sys/ioctl.h>
|
||||
.PP
|
||||
.BI "int ioctl(int " fd ", int " cmd ", ...);"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
ioperm \- set port input/output permissions
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BR "#include <sys/io.h>" " /* for glibc */"
|
||||
.B #include <sys/io.h>
|
||||
.PP
|
||||
.BI "int ioperm(unsigned long " from ", unsigned long " num ", int " turn_on );
|
||||
.fi
|
||||
|
|
|
@ -26,12 +26,18 @@
|
|||
ioprio_get, ioprio_set \- get/set I/O scheduling class and priority
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BI "int ioprio_get(int " which ", int " who );
|
||||
.BI "int ioprio_set(int " which ", int " who ", int " ioprio );
|
||||
.BR "#include <linux/ioprio.h> " "/* Definition of " IOPRIO_* " constants */"
|
||||
.BR "#include <sys/syscall.h> " "/* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int syscall(SYS_ioprio_get, int " which ", int " who );
|
||||
.BI "int syscall(SYS_ioprio_set, int " which ", int " who ", int " ioprio );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There are no glibc wrappers for these system calls; see NOTES.
|
||||
glibc provides no wrappers for these system calls,
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.BR ioprio_get ()
|
||||
|
@ -199,9 +205,6 @@ kernel 2.6.13.
|
|||
.SH CONFORMING TO
|
||||
These system calls are Linux-specific.
|
||||
.SH NOTES
|
||||
Glibc does not provide a wrapper for these system calls; call them using
|
||||
.BR syscall (2).
|
||||
.PP
|
||||
Two or more processes or threads can share an I/O context.
|
||||
This will be the case when
|
||||
.BR clone (2)
|
||||
|
|
19
man2/ipc.2
19
man2/ipc.2
|
@ -27,12 +27,21 @@
|
|||
ipc \- System V IPC system calls
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BI "int ipc(unsigned int " call ", int " first ", unsigned long " second ,
|
||||
.BI " unsigned long " third ", void *" ptr ", long " fifth );
|
||||
.BR "#include <linux/ipc.h>" " /* Definition of needed constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int syscall(SYS_ipc, unsigned int " call ", int " first ,
|
||||
.BI " unsigned long " second ", unsigned long " third \
|
||||
", void *" ptr ,
|
||||
.BI " long " fifth );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR ipc (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
.BR ipc ()
|
||||
is a common kernel entry point for the System\ V IPC calls
|
||||
|
@ -56,10 +65,6 @@ system call; instead,
|
|||
.BR semctl (2),
|
||||
.BR shmctl (2),
|
||||
and so on really are implemented as separate system calls.
|
||||
.PP
|
||||
Glibc does not provide a wrapper for this system call;
|
||||
in the unlikely event that you want to call it directly, you can do so using
|
||||
.BR syscall (2).
|
||||
.SH SEE ALSO
|
||||
.BR msgctl (2),
|
||||
.BR msgget (2),
|
||||
|
|
18
man2/kcmp.2
18
man2/kcmp.2
|
@ -30,14 +30,19 @@
|
|||
kcmp \- compare two processes to determine if they share a kernel resource
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <linux/kcmp.h>
|
||||
.BR "#include <linux/kcmp.h>" " /* Definition of " KCMP_* " constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int kcmp(pid_t " pid1 ", pid_t " pid2 ", int " type ,
|
||||
.BI " unsigned long " idx1 ", unsigned long " idx2 );
|
||||
.BI "int syscall(SYS_kcmp, pid_t " pid1 ", pid_t " pid2 ", int " type ,
|
||||
.BI " unsigned long " idx1 ", unsigned long " idx2 );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR kcmp (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.BR kcmp ()
|
||||
|
@ -303,13 +308,10 @@ system call first appeared in Linux 3.5.
|
|||
.BR kcmp ()
|
||||
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).
|
||||
.PP
|
||||
Before Linux 5.12,
|
||||
this system call is available only if the kernel is configured with
|
||||
.BR CONFIG_CHECKPOINT_RESTORE ,
|
||||
since the original pupose the system call was for the
|
||||
since the original purpose of the system call was for the
|
||||
checkpoint/restore in user space (CRIU) feature.
|
||||
(The alternative to this system call would have been to expose suitable
|
||||
process information via the
|
||||
|
|
|
@ -29,18 +29,23 @@
|
|||
kexec_load, kexec_file_load \- load a new kernel for later execution
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <linux/kexec.h>
|
||||
.BR "#include <linux/kexec.h>" " /* Definition of " KEXEC_* " constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "long kexec_load(unsigned long " entry ", unsigned long " nr_segments ,
|
||||
.BI " struct kexec_segment *" segments ,
|
||||
.BI " unsigned long " flags );
|
||||
.BI "long kexec_file_load(int " kernel_fd ", int " initrd_fd ,
|
||||
.BI " unsigned long " cmdline_len ", const char *" cmdline ,
|
||||
.BI " unsigned long " flags );
|
||||
.BI "long syscall(SYS_kexec_load, unsigned long " entry ,
|
||||
.BI " unsigned long " nr_segments \
|
||||
", struct kexec_segment *" segments ,
|
||||
.BI " unsigned long " flags );
|
||||
.BI "long syscall(SYS_kexec_file_load, int " kernel_fd ", int " initrd_fd ,
|
||||
.BI " unsigned long " cmdline_len ", const char *" cmdline ,
|
||||
.BI " unsigned long " flags );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There are no glibc wrappers for these system calls; see NOTES.
|
||||
glibc provides no wrappers for these system calls,
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.BR kexec_load ()
|
||||
|
@ -332,9 +337,6 @@ The
|
|||
system call first appeared in Linux 3.17.
|
||||
.SH CONFORMING TO
|
||||
These system calls are Linux-specific.
|
||||
.SH NOTES
|
||||
Glibc does not provide a wrapper for these system calls; call them using
|
||||
.BR syscall (2).
|
||||
.SH SEE ALSO
|
||||
.BR reboot (2),
|
||||
.BR syscall (2),
|
||||
|
|
|
@ -30,22 +30,20 @@
|
|||
keyctl \- manipulate the kernel's key management facility
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <keyutils.h>
|
||||
.PP
|
||||
.BI "long keyctl(int " operation ", ...);"
|
||||
.PP
|
||||
.B "/* For direct call via syscall(2): */"
|
||||
.B #include <asm/unistd.h>
|
||||
.B #include <linux/keyctl.h>
|
||||
.BR "#include <linux/keyctl.h>" " /* Definition of " KEY* " constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "long syscall(__NR_keyctl, int " operation ", unsigned long " arg2 ,
|
||||
.BI "long syscall(SYS_keyctl, int " operation ", unsigned long " arg2 ,
|
||||
.BI " unsigned long " arg3 ", unsigned long " arg4 ,
|
||||
.BI " unsigned long " arg5 );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR keyctl (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
.BR keyctl ()
|
||||
allows user-space programs to perform key manipulation.
|
||||
|
@ -1954,7 +1952,6 @@ This system call first appeared in Linux 2.6.10.
|
|||
.SH CONFORMING TO
|
||||
This system call is a nonstandard Linux extension.
|
||||
.SH NOTES
|
||||
Glibc does not provide a wrapper for this system call.
|
||||
A wrapper is provided in the
|
||||
.IR libkeyutils
|
||||
library.
|
||||
|
|
|
@ -38,7 +38,7 @@ link, linkat \- make a new name for a file
|
|||
.PP
|
||||
.BI "int link(const char *" oldpath ", const char *" newpath );
|
||||
.PP
|
||||
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
|
||||
.BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int linkat(int " olddirfd ", const char *" oldpath ,
|
||||
|
|
|
@ -31,15 +31,19 @@
|
|||
_llseek \- reposition read/write file offset
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int _llseek(unsigned int " fd ", unsigned long " offset_high ,
|
||||
.BI "int syscall(SYS__llseek, unsigned int " fd ", unsigned long " offset_high ,
|
||||
.BI " unsigned long " offset_low ", loff_t *" result ,
|
||||
.BI " unsigned int " whence );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR _llseek (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
Note: for information about the
|
||||
.BR llseek (3)
|
||||
|
@ -97,10 +101,7 @@ is invalid.
|
|||
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.
|
||||
To invoke it directly, use
|
||||
.BR syscall (2).
|
||||
However, you probably want to use the
|
||||
You probably want to use the
|
||||
.BR lseek (2)
|
||||
wrapper function instead.
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -29,11 +29,18 @@
|
|||
lookup_dcookie \- return a directory entry's path
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BI "int lookup_dcookie(uint64_t " cookie ", char *" buffer ", size_t " len );
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int syscall(SYS_lookup_dcookie, uint64_t " cookie ", char *" buffer ,
|
||||
.BI " size_t " len );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR lookup_dcookie (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
Look up the full path of the directory entry specified by the value
|
||||
.IR cookie .
|
||||
|
@ -92,8 +99,5 @@ It relies on a kernel driver to register cookies for directory entries.
|
|||
.PP
|
||||
The path returned may be suffixed by the string " (deleted)" if the directory
|
||||
entry has been removed.
|
||||
.PP
|
||||
Glibc does not provide a wrapper for this system call; call it using
|
||||
.BR syscall (2).
|
||||
.SH SEE ALSO
|
||||
.BR oprofile (1)
|
||||
|
|
|
@ -28,13 +28,20 @@ membarrier \- issue memory barriers on a set of threads
|
|||
.SH SYNOPSIS
|
||||
.nf
|
||||
.PP
|
||||
.B #include <linux/membarrier.h>
|
||||
.BR "#include <linux/membarrier.h>" \
|
||||
" /* Definition of " MEMBARRIER_* " constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int membarrier(int " cmd ", unsigned int " flags ", int " cpu_id );
|
||||
.BI "int syscall(SYS_membarrier, int " cmd ", unsigned int " flags \
|
||||
", int " cpu_id );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR membarrier (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.BR membarrier ()
|
||||
|
@ -322,9 +329,6 @@ Examples where
|
|||
.BR membarrier ()
|
||||
can be useful include implementations
|
||||
of Read-Copy-Update libraries and garbage collectors.
|
||||
.PP
|
||||
Glibc does not provide a wrapper for this system call; call it using
|
||||
.BR syscall (2).
|
||||
.SH EXAMPLES
|
||||
Assuming a multithreaded application where "fast_path()" is executed
|
||||
very frequently, and where "slow_path()" is executed infrequently, the
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
mincore \- determine whether pages are resident in memory
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <unistd.h>
|
||||
.B #include <sys/mman.h>
|
||||
.PP
|
||||
.BI "int mincore(void *" addr ", size_t " length ", unsigned char *" vec );
|
||||
|
|
|
@ -18,8 +18,6 @@ mknod, mknodat \- create a special or ordinary file
|
|||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <sys/stat.h>
|
||||
.B #include <fcntl.h>
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int mknod(const char *" pathname ", mode_t " mode ", dev_t " dev );
|
||||
.PP
|
||||
|
|
10
man2/mmap2.2
10
man2/mmap2.2
|
@ -31,11 +31,13 @@
|
|||
mmap2 \- map files or devices into memory
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <sys/mman.h>
|
||||
.BR "#include <sys/mman.h>" " /* Definition of " MAP_* " and " PROT_* " constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.BR "#include <unistd.h>
|
||||
.PP
|
||||
.BI "void *mmap2(unsigned long " addr ", unsigned long " length ,
|
||||
.BI " unsigned long " prot ", unsigned long " flags ,
|
||||
.BI " unsigned long " fd ", unsigned long " pgoffset );
|
||||
.BI "void *syscall(SYS_mmap2, unsigned long " addr ", unsigned long " length ,
|
||||
.BI " unsigned long " prot ", unsigned long " flags ,
|
||||
.BI " unsigned long " fd ", unsigned long " pgoffset );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
This is probably not the system call that you are interested in; instead, see
|
||||
|
|
|
@ -27,11 +27,19 @@
|
|||
modify_ldt \- get or set a per-process LDT entry
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BI "int modify_ldt(int " func ", void *" ptr ", unsigned long " bytecount );
|
||||
.BR "#include <asm/ldt.h>" " /* Definition of " "struct user_desc" " */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int syscall(SYS_modify_ldt, int " func ", void *" ptr ,
|
||||
.BI " unsigned long " bytecount );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR modify_ldt (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
.BR modify_ldt ()
|
||||
reads or writes the local descriptor table (LDT) for a process.
|
||||
|
@ -168,9 +176,6 @@ is neither 0, 1, 2, nor 0x11.
|
|||
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).
|
||||
.PP
|
||||
.BR modify_ldt ()
|
||||
should not be used for thread-local storage, as it slows down context
|
||||
switches and only supports a limited number of threads.
|
||||
|
|
|
@ -27,14 +27,13 @@
|
|||
mq_getsetattr \- get/set message queue attributes
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <mqueue.h>
|
||||
.BR "#include <mqueue.h>" " /* Definition of " "struct mq_attr" " */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int mq_getsetattr(mqd_t " mqdes ", const struct mq_attr *" newattr ,
|
||||
.BI " struct mq_attr *" oldattr );
|
||||
.BI "int syscall(SYS_mq_getsetattr, mqd_t " mqdes ,
|
||||
.BI " const struct mq_attr *" newattr ", struct mq_attr *" oldattr );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
.SH DESCRIPTION
|
||||
Do not use this system call.
|
||||
.PP
|
||||
|
@ -48,9 +47,7 @@ see the description of
|
|||
.SH CONFORMING TO
|
||||
This interface is nonstandard; 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 C library!)
|
||||
Never call it unless you are writing a C library!
|
||||
.SH SEE ALSO
|
||||
.BR mq_getattr (3),
|
||||
.BR mq_overview (7)
|
||||
|
|
|
@ -26,16 +26,21 @@
|
|||
openat2 \- open and possibly create a file (extended)
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <sys/stat.h>
|
||||
.B #include <fcntl.h>
|
||||
.B #include <linux/openat2.h>
|
||||
.BR "#include <fcntl.h>" \
|
||||
" /* Definition of " O_* " and " S_* " constants */"
|
||||
.BR "#include <linux/openat2.h>" " /* Definition of " RESOLVE_* " constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "long openat2(int " dirfd ", const char *" pathname ,
|
||||
.BI " struct open_how *" how ", size_t " size );
|
||||
.BI "long syscall(SYS_openat2, int " dirfd ", const char *" pathname ,
|
||||
.BI " struct open_how *" how ", size_t " size );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR openat2 (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.BR openat2 ()
|
||||
|
@ -494,9 +499,6 @@ The semantics of
|
|||
were modeled after FreeBSD's
|
||||
.BR O_BENEATH .
|
||||
.SH NOTES
|
||||
Glibc does not provide a wrapper for this system call; call it using
|
||||
.BR syscall (2).
|
||||
.\"
|
||||
.SS Extensibility
|
||||
In order to allow for future extensibility,
|
||||
.BR openat2 ()
|
||||
|
|
|
@ -29,16 +29,21 @@
|
|||
perf_event_open \- set up performance monitoring
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <linux/perf_event.h>
|
||||
.B #include <linux/hw_breakpoint.h>
|
||||
.BR "#include <linux/perf_event.h>" " /* Definition of " PERF_* " constants */"
|
||||
.BR "#include <linux/hw_breakpoint.h>" " /* Definition of " HW_* " constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int perf_event_open(struct perf_event_attr *" attr ,
|
||||
.BI " pid_t " pid ", int " cpu ", int " group_fd ,
|
||||
.BI " unsigned long " flags );
|
||||
.BI "int syscall(SYS_perf_event_open, struct perf_event_attr *" attr ,
|
||||
.BI " pid_t " pid ", int " cpu ", int " group_fd \
|
||||
", unsigned long " flags );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR perf_event_open (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
Given a list of parameters,
|
||||
.BR perf_event_open ()
|
||||
|
@ -3641,10 +3646,6 @@ This
|
|||
system call 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).
|
||||
See the example below.
|
||||
.PP
|
||||
The official way of knowing if
|
||||
.BR perf_event_open ()
|
||||
support is enabled is checking
|
||||
|
|
|
@ -27,11 +27,18 @@
|
|||
pidfd_getfd \- obtain a duplicate of another process's file descriptor
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BI "int pidfd_getfd(int " pidfd ", int " targetfd ", unsigned int " flags );
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int syscall(SYS_pidfd_getfd, int " pidfd ", int " targetfd ,
|
||||
.BI " unsigned int " flags );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR pidfd_getfd (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.BR pidfd_getfd ()
|
||||
|
@ -121,9 +128,6 @@ first appeared in Linux 5.6.
|
|||
.BR pidfd_getfd ()
|
||||
is Linux specific.
|
||||
.SH NOTES
|
||||
Glibc does not provide a wrapper for this system call; call it using
|
||||
.BR syscall (2).
|
||||
.PP
|
||||
For a description of PID file descriptors, see
|
||||
.BR pidfd_open (2).
|
||||
.PP
|
||||
|
|
|
@ -27,11 +27,17 @@
|
|||
pidfd_open \- obtain a file descriptor that refers to a process
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BI "int pidfd_open(pid_t " pid ", unsigned int " flags );
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int syscall(SYS_pidfd_open, pid_t " pid ", unsigned int " flags );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR pidfd_open (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.BR pidfd_open ()
|
||||
|
@ -89,9 +95,6 @@ first appeared in Linux 5.3.
|
|||
.BR pidfd_open ()
|
||||
is Linux specific.
|
||||
.SH NOTES
|
||||
Glibc does not provide a wrapper for this system call; call it using
|
||||
.BR syscall (2).
|
||||
.PP
|
||||
The following code sequence can be used to obtain a file descriptor
|
||||
for the child of
|
||||
.BR fork (2):
|
||||
|
|
|
@ -27,14 +27,21 @@
|
|||
pidfd_send_signal \- send a signal to a process specified by a file descriptor
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B "#include <signal.h>"
|
||||
.BR "#include <linux/signal.h>" " /* Definition of " SIG* " constants */"
|
||||
.BR "#include <signal.h>" " /* Definition of " SI_* " constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int pidfd_send_signal(int " pidfd ", int " sig ", siginfo_t *" info ,
|
||||
.BI "int syscall(SYS_pidfd_send_signal, int " pidfd ", int " sig \
|
||||
", siginfo_t *" info ,
|
||||
.BI " unsigned int " flags );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR pidfd_send_signal (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.BR pidfd_send_signal ()
|
||||
|
@ -136,9 +143,6 @@ first appeared in Linux 5.1.
|
|||
.BR pidfd_send_signal ()
|
||||
is Linux specific.
|
||||
.SH NOTES
|
||||
Glibc does not provide a wrapper for this system call; call it using
|
||||
.BR syscall (2).
|
||||
.\"
|
||||
.SS PID file descriptors
|
||||
The
|
||||
.I pidfd
|
||||
|
|
|
@ -40,10 +40,10 @@ pipe, pipe2 \- create pipe
|
|||
.nf
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int pipe(int " pipefd "[2]);"
|
||||
.BI "int pipe(int " pipefd [2]);
|
||||
.PP
|
||||
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||
.BR "#include <fcntl.h>" " /* Obtain O_* constant definitions */"
|
||||
.BR "#include <fcntl.h>" " /* Definition of " O_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int pipe2(int " pipefd "[2], int " flags );
|
||||
|
|
|
@ -29,11 +29,18 @@
|
|||
pivot_root \- change the root mount
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BI "int pivot_root(const char *" new_root ", const char *" put_old );
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int syscall(SYS_pivot_root, const char *" new_root \
|
||||
", const char *" put_old );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR pivot_root (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.SH DESCRIPTION
|
||||
.BR pivot_root ()
|
||||
changes the root mount in the mount namespace of the calling process.
|
||||
|
@ -168,9 +175,6 @@ was introduced in Linux 2.3.41.
|
|||
.BR pivot_root ()
|
||||
is Linux-specific and hence is not portable.
|
||||
.SH NOTES
|
||||
Glibc does not provide a wrapper for this system call; call it using
|
||||
.BR syscall (2).
|
||||
.PP
|
||||
A command-line interface for this system call is provided by
|
||||
.BR pivot_root (8).
|
||||
.PP
|
||||
|
|
|
@ -37,11 +37,10 @@ poll, ppoll \- wait for some event on a file descriptor
|
|||
.BI "int poll(struct pollfd *" fds ", nfds_t " nfds ", int " timeout );
|
||||
.PP
|
||||
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||
.B #include <signal.h>
|
||||
.B #include <poll.h>
|
||||
.PP
|
||||
.BI "int ppoll(struct pollfd *" fds ", nfds_t " nfds ,
|
||||
.BI " const struct timespec *" tmo_p ", const sigset_t *" sigmask );
|
||||
.BI " const struct timespec *" tmo_p ", const sigset_t *" sigmask );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.BR poll ()
|
||||
|
|
|
@ -30,15 +30,22 @@
|
|||
process_madvise \- give advice about use of memory to a process
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <sys/uio.h>
|
||||
.BR "#include <sys/mman.h>" " /* Definition of " MADV_* " constants */"
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.BR "#include <sys/uio.h>" " /* Definition of " "struct iovec" " type */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "ssize_t process_madvise(int " pidfd ", const struct iovec *" iovec ,
|
||||
.BI " size_t " vlen ", int " advice ,
|
||||
.BI " unsigned int " flags ");"
|
||||
.BI "ssize_t syscall(SYS_process_madvise, int " pidfd ,
|
||||
.BI " const struct iovec *" iovec ", size_t " vlen \
|
||||
", int " advice ,
|
||||
.BI " unsigned int " flags ");"
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR process_madvise (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.\" FIXME: See <https://sourceware.org/bugzilla/show_bug.cgi?id=27380>
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
|
@ -205,9 +212,6 @@ configuration option.
|
|||
The
|
||||
.BR process_madvise ()
|
||||
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 madvise (2),
|
||||
.BR pidfd_open (2),
|
||||
|
|
|
@ -30,7 +30,9 @@ quotactl \- manipulate disk quotas
|
|||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <sys/quota.h>
|
||||
.B #include <xfs/xqm.h> /* for XFS quotas */
|
||||
.BR "#include <xfs/xqm.h>" " /* Definition of " Q_X* " and " XFS_QUOTA_* \
|
||||
" constants"
|
||||
.RB " (or " <linux/dqblk_xfs.h> "; see NOTES) */"
|
||||
.PP
|
||||
.BI "int quotactl(int " cmd ", const char *" special ", int " id \
|
||||
", caddr_t " addr );
|
||||
|
|
|
@ -32,13 +32,17 @@
|
|||
readdir \- read directory entry
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "int readdir(unsigned int " fd ", struct old_linux_dirent *" dirp ","
|
||||
.BI " unsigned int " count );
|
||||
.BI "int syscall(SYS_readdir, unsigned int " fd ,
|
||||
.BI " struct old_linux_dirent *" dirp ", unsigned int " count );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for this system call; see NOTES.
|
||||
There is no definition of
|
||||
.BR "struct old_linux_dirent" ;
|
||||
see NOTES.
|
||||
.SH DESCRIPTION
|
||||
This is not the function you are interested in.
|
||||
Look at
|
||||
|
@ -116,8 +120,6 @@ 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).
|
||||
You will need to define the
|
||||
.I old_linux_dirent
|
||||
structure yourself.
|
||||
|
|
|
@ -51,7 +51,7 @@ readlink, readlinkat \- read value of a symbolic link
|
|||
.BI "ssize_t readlink(const char *restrict " pathname ", char *restrict " buf ,
|
||||
.BI " size_t " bufsiz );
|
||||
.PP
|
||||
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
|
||||
.BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "ssize_t readlinkat(int " dirfd ", const char *restrict " pathname ,
|
||||
|
|
|
@ -30,21 +30,23 @@
|
|||
reboot \- reboot or enable/disable Ctrl-Alt-Del
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
/* Since kernel version 2.1.30 there are symbolic names LINUX_REBOOT_*
|
||||
.RB "/* Since kernel version 2.1.30 there are symbolic names " LINUX_REBOOT_*
|
||||
for the constants and a fourth argument to the call: */
|
||||
.PP
|
||||
.BR "#include <linux/reboot.h> " \
|
||||
"/* Definition of " LINUX_REBOOT_* " constants */"
|
||||
.BR "#include <sys/syscall.h> " "/* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.B #include <linux/reboot.h>
|
||||
.PP
|
||||
.BI "int reboot(int " magic ", int " magic2 ", int " cmd ", void *" arg );
|
||||
.BI "int syscall(SYS_reboot, int " magic ", int " magic2 ", int " cmd ", void *" arg );
|
||||
.PP
|
||||
/* Under glibc and most alternative libc's (including uclibc, dietlibc,
|
||||
musl and a few others), some of the constants involved have gotten
|
||||
symbolic names RB_*, and the library call is a 1-argument
|
||||
.RB " symbolic names " RB_* ", and the library call is a 1-argument"
|
||||
wrapper around the system call: */
|
||||
.PP
|
||||
.BR "#include <sys/reboot.h> " "/* Definition of " RB_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.B #include <sys/reboot.h>
|
||||
.PP
|
||||
.BI "int reboot(int " cmd );
|
||||
.fi
|
||||
|
|
|
@ -136,6 +136,7 @@ function man_lsfunc()
|
|||
|sed_rm_ccomments \
|
||||
|pcregrep -Mn '(?s)^ [\w ]+ \**\w+\([\w\s(,)[\]*]+?(...)?\s*\); *$' \
|
||||
|grep '^[0-9]' \
|
||||
|sed 's/syscall(SYS_\(\w*\),/\1(/' \
|
||||
|sed -E 's/^[^(]+ \**(\w+)\(.*/\1/' \
|
||||
|uniq;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue