io_getevents.2: Use syscall(SYS_...); for system calls without a wrapper

In this case there's a wrapper provided by libaio,
but this page documents the raw syscall.

Also remove <linux/time.h> from the includes: 'struct timespec'
is already documented in system_data_types(7), where the
information is more up to date.

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-05-10 19:55:15 +02:00 committed by Michael Kerrisk
parent 950d1738ef
commit 8b4c942c50
1 changed files with 11 additions and 10 deletions

View File

@ -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