From patchwork Thu Feb 18 22:33:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1441910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=BMaE1cxJ; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DhV1d5fJYz9rx6 for ; Fri, 19 Feb 2021 09:36:37 +1100 (AEDT) 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 ; 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 ; 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org, Ulrich Drepper Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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 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