Message ID | 20210218223356.320470-1-alx.manpages@gmail.com |
---|---|
State | Not applicable |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 931033951885; Thu, 18 Feb 2021 22:36:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 931033951885 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1613687792; bh=04VDBeMAtOld+t85/rJpxg5AK1SqoygduLFrYM5uhPg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=BMaE1cxJkHvpblEKQnrNIrQA3fGqrp8D5lP+0awv0Gt4IP2UzkuUWiO2bWNIe+ZCH 7VLehuD3nfQv/pNyYS/tS9KYvPHfMBUw2qSToSvavAczO4BWKQ1HtYaQrdI2340Quj IrFaTAws1/picpcauqkU3KdTOmFJ92Zi/7Tyvuqc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 8477A3950426 for <libc-alpha@sourceware.org>; Thu, 18 Feb 2021 22:36:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8477A3950426 Received: by mail-wm1-x330.google.com with SMTP id o82so5106693wme.1 for <libc-alpha@sourceware.org>; Thu, 18 Feb 2021 14:36:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=04VDBeMAtOld+t85/rJpxg5AK1SqoygduLFrYM5uhPg=; b=oppPOwyWNtTB/fNTarxbzteNv8D5BveEf8oKWuRKMHOjvKYR8AC66lQh2xRTSnd8yV jGkWMVwYwMysv8xwqJuEQivtrozGBsIsFtq+NBjTrvQxQGgubINE7mVRVgD9fOFPFCMo Oh62gjrZ5/X2/Ft6klgMzbZfWVjjEWYHI11lPGCUUehYPTRVfS8+LDEPbmijtzsbznoU P1YpubQEiGItfiFlqVeUbHFcS7UpFFiax4Icmi9POz9CDJMAFpnDOQ3YwEZHMOhdn/AH XIs3PtGfdsrmEu/Kq7o6GXXoM4pYvI3zFATLDYRVDffuTOkI1r+gvfQZxo7guoRRkpdg m8yg== X-Gm-Message-State: AOAM532EiGb1YcX7DR+aqdr187fmUrJ6shsYc1xtjq/4mFdOAnOWmelL 9NCB1cjbJH16j6+PGWKXnx4= X-Google-Smtp-Source: ABdhPJzr7XPxiVvmMNgYdSTuVa/DTUaeXsGuyASM1oHCbaH/LcOtLZKJea3sdGsktnayxDaf85eneg== X-Received: by 2002:a1c:e903:: with SMTP id q3mr5441997wmc.100.1613687789746; Thu, 18 Feb 2021 14:36:29 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id t198sm9975412wmt.7.2021.02.18.14.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 14:36:29 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH] aio_suspend.3: SYNOPSIS: Use 'restrict' in prototypes Date: Thu, 18 Feb 2021 23:33:57 +0100 Message-Id: <20210218223356.320470-1-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Alejandro Colomar via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Alejandro Colomar <alx.manpages@gmail.com> Cc: Alejandro Colomar <alx.manpages@gmail.com>, linux-man@vger.kernel.org, libc-alpha@sourceware.org, Ulrich Drepper <drepper@redhat.com> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
aio_suspend.3: SYNOPSIS: Use 'restrict' in prototypes
|
|
Commit Message
Alejandro Colomar
Feb. 18, 2021, 10:33 p.m. UTC
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(-)
Comments
Hello Alex, On 2/18/21 11:33 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! Thanks for spotting this. Perhaps if we apply this, the patch should include something in CONFORMING TO to note that POSIX doesn't specify 'restrict'. What do you think? 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> > --- > > 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 >
On 2/19/21 1:25 PM, Michael Kerrisk (man-pages) wrote: > Hello Alex, > > On 2/18/21 11:33 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! > > Thanks for spotting this. Perhaps if we apply this, > the patch should include something in CONFORMING TO to > note that POSIX doesn't specify 'restrict'. What do > you think? Hi Michael, I was about to ask exactly that in the email, but I forgot :) Yes. Cheers, Alex > > 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> >> --- >> >> 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 >> > >
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