public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org,
	libc-alpha@sourceware.org, Ulrich Drepper <drepper@redhat.com>
Subject: Re: [PATCH v2] aio_suspend.3: SYNOPSIS: Use 'restrict' in prototypes
Date: Sat, 20 Feb 2021 15:36:42 +0100	[thread overview]
Message-ID: <a9a8068b-9a03-11e3-34db-7ca58a6fd5d1@gmail.com> (raw)
In-Reply-To: <20210219130326.12772-1-alx.manpages@gmail.com>

On 2/19/21 2:03 PM, Alejandro Colomar wrote:
> 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!

Hi Alex. 

Patch applied. Thanks!

Cheers,

Michael

> ......
> 
> .../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>
> ---
> 
> v2:
> 	- wsfix + srcfix: Avoid breaking the line in the prototype
> 	- Note the difference between POSIX and glibc in CONFORMING TO.
> 
> ---
>  man3/aio_suspend.3 | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/man3/aio_suspend.3 b/man3/aio_suspend.3
> index 76a05f48e..e0355a449 100644
> --- a/man3/aio_suspend.3
> +++ b/man3/aio_suspend.3
> @@ -30,8 +30,8 @@ aio_suspend \- wait for asynchronous I/O operation or timeout
>  .PP
>  .B "#include <aio.h>"
>  .PP
> -.BI "int aio_suspend(const struct aiocb * const " aiocb_list [],
> -.BI "                int " nitems ", const struct timespec *" timeout );
> +.BI "int aio_suspend(const struct aiocb *const " aiocb_list "[], int " nitems ,
> +.BI "                const struct timespec *restrict " timeout );
>  .PP
>  Link with \fI\-lrt\fP.
>  .fi
> @@ -122,6 +122,10 @@ T}	Thread safety	MT-Safe
>  .sp 1
>  .SH CONFORMING TO
>  POSIX.1-2001, POSIX.1-2008.
> +.PP
> +POSIX doesn't specify the parameters to be
> +.IR restrict ;
> +that is specific to glibc.
>  .SH NOTES
>  One can achieve polling by using a non-NULL
>  .I timeout
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

      reply	other threads:[~2021-02-20 14:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=a9a8068b-9a03-11e3-34db-7ca58a6fd5d1@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=drepper@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    /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