aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-05-10 19:55:14 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-05-11 17:18:08 +1200
commit950d1738ef91a2b6dde2d8eb61276b972c4657ff (patch)
treec448eed58dd31258fe9d373d7e26ded05115ff9f
parentcac89bc7943451cc66a9e7a0c4f5b50c270f273b (diff)
downloadman-pages-950d1738ef91a2b6dde2d8eb61276b972c4657ff.tar.gz
io_destroy.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. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/io_destroy.216
1 files changed, 9 insertions, 7 deletions
diff --git a/man2/io_destroy.2 b/man2/io_destroy.2
index b439f11846..c9418336f2 100644
--- a/man2/io_destroy.2
+++ b/man2/io_destroy.2
@@ -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