userfaultfd.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-06-12 10:31:40 +02:00 committed by Michael Kerrisk
parent 6aaa1bc40b
commit e1960e7e7e
1 changed files with 8 additions and 5 deletions

View File

@ -29,12 +29,18 @@
userfaultfd \- create a file descriptor for handling page faults in user space
.SH SYNOPSIS
.nf
.BR "#include <fcntl.h>" " /* Definition of " O_* " constants */"
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
.PP
.BI "int userfaultfd(int " flags );
.BI "int syscall(SYS_userfaultfd, int " flags );
.fi
.PP
.IR Note :
There is no glibc wrapper for this system call; see NOTES.
glibc provides no wrapper for
.BR userfaultfd (),
necessitating the use of
.BR syscall (2).
.SH DESCRIPTION
.BR userfaultfd ()
creates a new userfaultfd object that can be used for delegation of page-fault
@ -573,9 +579,6 @@ non-page-fault events was added in Linux 4.11
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
The userfaultfd mechanism can be used as an alternative to
traditional user-space paging techniques based on the use of the
.BR SIGSEGV