public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: mtk.manpages@gmail.com
Cc: Alejandro Colomar <alx.manpages@gmail.com>,
	linux-man@vger.kernel.org, libc-alpha@sourceware.org,
	Ulrich Drepper <drepper@redhat.com>
Subject: [PATCH] aio_suspend.3: SYNOPSIS: Use 'restrict' in prototypes
Date: Thu, 18 Feb 2021 23:33:57 +0100	[thread overview]
Message-ID: <20210218223356.320470-1-alx.manpages@gmail.com> (raw)

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


             reply	other threads:[~2021-02-18 22:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 22:33 Alejandro Colomar [this message]
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)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210218223356.320470-1-alx.manpages@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=drepper@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).