From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id C1262386181F for ; Fri, 19 Feb 2021 12:25:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C1262386181F Received: by mail-wr1-x433.google.com with SMTP id r21so8172004wrr.9 for ; Fri, 19 Feb 2021 04:25:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zxJ12+eOdZ7mzCTpsFw5JqkQYR7b/pfJua9ThTsQuqI=; b=PQLUePD6mKnLQX1XngOxI1sr24Eux2LJ+6fsCfwzQBxJ5w6KFB7uLT4kVZ/QBEFZEE 4M8erY4gufQNRoHM67mr6zDsBWdVGF2+5TL4OAzXIX0IH2rshg+6pPDVENm+UCYxPiT3 2ccZz1Bh/rIu/RG+8whMhG3x/Nj+QT5GErLcN9C7XgYyWXS4HZgDmwSWbI2hN0S00xK8 bpHw6DnmIVeGxFwaVCPeFv+GMk8P9sDhNZ6DyE9jCprlaxcZtxWfjd/p4OYhTcVJJ1pF JdTMqWBAXsGzXxzl7RehElrIko4AkBcu9sD1XmprDU6Ov58ESnlpJLtIHq7ySSiLZEvi X7hQ== X-Gm-Message-State: AOAM532dX3vKbHMiJN0czaCIHmWeqWA8ujwPk9LBQj6L4zbgtM4o4UCD N+FbhbqlzNbgLETtvs+UAZI= X-Google-Smtp-Source: ABdhPJytVa7Z1zMHJgrbv1DsgXaVHis01crJI8Td0FTIbUYGel89LHLZ9Rg5iDaK5Jwp1y8+ILgS1Q== X-Received: by 2002:adf:fc48:: with SMTP id e8mr9125635wrs.154.1613737530901; Fri, 19 Feb 2021 04:25:30 -0800 (PST) Received: from ?IPv6:2001:a61:3a2d:1d01:99ab:4f20:ed7f:402b? ([2001:a61:3a2d:1d01:99ab:4f20:ed7f:402b]) by smtp.gmail.com with ESMTPSA id a21sm13674938wmb.5.2021.02.19.04.25.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Feb 2021 04:25:30 -0800 (PST) Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, libc-alpha@sourceware.org, Ulrich Drepper Subject: Re: [PATCH] aio_suspend.3: SYNOPSIS: Use 'restrict' in prototypes To: Alejandro Colomar References: <20210218223356.320470-1-alx.manpages@gmail.com> From: "Michael Kerrisk (man-pages)" Message-ID: Date: Fri, 19 Feb 2021 13:25:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210218223356.320470-1-alx.manpages@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 12:25:33 -0000 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 > Signed-off-by: Alejandro Colomar > --- > > 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 " > .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 > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/