]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
lio_listio.3: SYNOPSIS: Use 'restrict' in prototypes
authorAlejandro Colomar <alx.manpages@gmail.com>
Fri, 5 Mar 2021 23:50:51 +0000 (00:50 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 7 Mar 2021 10:16:21 +0000 (11:16 +0100)
Both POSIX and glibc use 'restrict' in lio_listio().
However, POSIX is a bit more restrictive than glibc
for the second parameter.
Let's document the more restrictive POSIX variant.

$ man 3p lio_listio |sed -n '/^SYNOPSIS/,/;/p'
SYNOPSIS
       #include <aio.h>

       int lio_listio(int mode, struct aiocb *restrict const list[restrict],
           int nent, struct sigevent *restrict sig);
$

.../glibc$ grep_glibc_prototype lio_listio
rt/aio.h:148:
extern int lio_listio (int __mode,
       struct aiocb *const __list[__restrict_arr],
       int __nent, struct sigevent *__restrict __sig)
  __THROW __nonnull ((2));
.../glibc$

Cc: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
Cc: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: glibc <libc-alpha@sourceware.org>
Bug: glibc <https://sourceware.org/bugzilla/show_bug.cgi?id=16747>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/lio_listio.3

index d89670f7c891e5a28326f134e9a23ab35cf57926..d40ac89fb0ddaae348d32edcadb8c6e0f0210546 100644 (file)
@@ -28,8 +28,8 @@ lio_listio \- initiate a list of I/O requests
 .nf
 .B "#include <aio.h>"
 .PP
-.BI "int lio_listio(int " mode ", struct aiocb *const " aiocb_list [],
-.BI "               int " nitems ", struct sigevent *" sevp );
+.BI "int lio_listio(int " mode ", struct aiocb *restrict const " aiocb_list [restrict],
+.BI "               int " nitems ", struct sigevent *restrict " sevp );
 .PP
 Link with \fI\-lrt\fP.
 .fi