[v4,28/35] io_cancel.2: Use syscall(SYS_...); for system calls without a wrapper

Message ID 20210403194026.102818-29-alx.manpages@gmail.com
State Not applicable
Headers
Series SYNOPSIS: Use syscall(SYS_...); and fix '#include's |

Commit Message

Alejandro Colomar April 3, 2021, 7:40 p.m. UTC
  In this case there's a wrapper provided by libaio,
but this page documents the raw kernel syscall.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/io_cancel.2 | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
  

Patch

diff --git a/man2/io_cancel.2 b/man2/io_cancel.2
index e09984ecd..248fe5791 100644
--- a/man2/io_cancel.2
+++ b/man2/io_cancel.2
@@ -9,14 +9,13 @@ 
 io_cancel \- cancel an outstanding asynchronous I/O operation
 .SH SYNOPSIS
 .nf
-.BR "#include <linux/aio_abi.h>" "          /* Defines needed types */"
+.BR "#include <linux/aio_abi.h>" "    /* Definition of needed types */"
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
 .PP
-.BI "int io_cancel(aio_context_t " ctx_id ", struct iocb *" iocb ,
-.BI "              struct io_event *" result );
+.BI "int syscall(SYS_io_cancel, aio_context_t " ctx_id ", struct iocb *" iocb ,
+.BI "            struct io_event *" result );
 .fi
-.PP
-.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
 .SH DESCRIPTION
 .IR Note :
 this page describes the raw Linux system call interface.
@@ -68,10 +67,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_cancel ()
 wrapper function provided by
 .\" http://git.fedorahosted.org/git/?p=libaio.git