userfaultfd.2: wsfix

Signed-off-by: Michael Kerrisk <mtk@man7.org>
This commit is contained in:
Michael Kerrisk 2017-01-27 08:33:26 +13:00 committed by Michael Kerrisk
parent de6943fab3
commit 00f4853c43
1 changed files with 6 additions and 6 deletions

View File

@ -145,7 +145,7 @@ struct uffd_msg {
__u8 event; /* Type of event */
...
union {
struct {
struct {
__u64 flags; /* Flags describing fault */
__u64 address; /* Faulting address */
} pagefault;
@ -278,7 +278,7 @@ and registers the address range of that mapping using the
.B UFFDIO_REGISTER
.BR ioctl (2)
operation.
The program then creates a second thread that will perform the
The program then creates a second thread that will perform the
task of handling page faults.
The main thread then walks through the pages of the mapping fetching
@ -298,7 +298,7 @@ All such events should be
events,
which the thread handles by copying a page of data into
the faulting region using the
.B UFFDIO_COPY
.B UFFDIO_COPY
.BR ioctl (2)
operation.
@ -341,7 +341,7 @@ Read address 0x7fd30106ec0f in main(): C
\&
.nf
/* userfaultfd_demo.c
Licensed under the GNU General Public License version 2 or later.
*/
#define _GNU_SOURCE
@ -414,11 +414,11 @@ fault_handler_thread(void *arg)
if (nread == 0) {
printf("EOF on userfaultfd!\\n");
exit(EXIT_FAILURE);
}
}
if (nread == \-1)
errExit("read");
/* We expect only one kind of event; verify that assumption */
if (msg.event != UFFD_EVENT_PAGEFAULT) {