public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] aio_suspend.3: SYNOPSIS: Use 'restrict' in prototypes
@ 2021-02-18 22:33 Alejandro Colomar
  2021-02-19 12:25 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 5+ messages in thread
From: Alejandro Colomar @ 2021-02-18 22:33 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man, libc-alpha, Ulrich Drepper

POSIX does NOT specify aio_suspend() to use 'restrict'.
However, glibc uses 'restrict'.
Users might be surprised by this!  Let's use it here too!

......

.../glibc$ grep_glibc_prototype aio_suspend
rt/aio.h:167:
extern int aio_suspend (const struct aiocb *const __list[], int __nent,
			const struct timespec *__restrict __timeout)
  __nonnull ((1));
.../glibc$

Cc: libc-alpha@sourceware.org
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---

Hello Michael,

I sent this patch separately because it's a bit different,
and would like someone from glibc to check it.
I CCd Ulrich, who added 'restrict' to the function in glibc.

Thanks,

Alex

---
 man3/aio_suspend.3 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/man3/aio_suspend.3 b/man3/aio_suspend.3
index 76a05f48e..dcae51e1c 100644
--- a/man3/aio_suspend.3
+++ b/man3/aio_suspend.3
@@ -31,7 +31,8 @@ aio_suspend \- wait for asynchronous I/O operation or timeout
 .B "#include <aio.h>"
 .PP
 .BI "int aio_suspend(const struct aiocb * const " aiocb_list [],
-.BI "                int " nitems ", const struct timespec *" timeout );
+.BI "                int " nitems \
+", const struct timespec *restrict " timeout );
 .PP
 Link with \fI\-lrt\fP.
 .fi
-- 
2.30.1.721.g45526154a5


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-20 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 22:33 [PATCH] aio_suspend.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-02-19 12:25 ` Michael Kerrisk (man-pages)
2021-02-19 12:30   ` Alejandro Colomar (man-pages)
2021-02-19 13:03     ` [PATCH v2] " Alejandro Colomar
2021-02-20 14:36       ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).