From patchwork Fri Feb 19 13:03:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 42116 Return-Path: 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 8B436387089A; Fri, 19 Feb 2021 13:05:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B436387089A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1613739959; bh=yKTMi6lrnDx8GoFcbU9t+A71vuFtFXVSxM5TfNCBl94=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=WsZzOt1CEp1TdWE68xF9stlSQBN2SbVE5W7AsTn3l+QL4Ltl4tO+aG+bNX9/iVPuE k2p2d8WMyJMYFvAHMZLz3BnNkB+mA4sZ3r+ozmHasccefEio5zh7eD9QZmQ/Dtd//N PVpKgfCz2bZUu3qhtbuS316FgFtRAIC5OhKEcN/g= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 218F4385481F for ; Fri, 19 Feb 2021 13:05:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 218F4385481F Received: by mail-wm1-x332.google.com with SMTP id o82so7055646wme.1 for ; Fri, 19 Feb 2021 05:05:57 -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:in-reply-to :references:mime-version:content-transfer-encoding; bh=yKTMi6lrnDx8GoFcbU9t+A71vuFtFXVSxM5TfNCBl94=; b=j/XhQwXCXEha9u/v3B3n7Qtlknv0TjWY39zmPybrFGvl2ZRBwVpRnGnxl89BzDc47P 8AtV3UuHuOolsyotKLW6hfdenubV7SIJbSEYeFDfkUaWYnlaIg2RoowfXONlCFcDv4MR SyG7XPzOx1IA4AfYbCQtUSFK4r9bq/kEnNS6T7Bk0esgG2YE92wp6sY3cZy1juKJ60rN TjUJNLjdTdfO8LrcFB20fkZE5TE+jYUyjppLe5vS5fvOC5cgAP+jkj1DYCnpdjJngrQ7 ryvMa6AfgSKmSyfyzV5cFMEScZbR6P4z9gXbaERfbeRjsNShaUz6bymHV4o/I2H32l6y a2iw== X-Gm-Message-State: AOAM530O4qbVmMmDibqUIC20cdJRoyPKXiYOy+rT/Mt08Er1un4l2Sl3 HMM56qDQQV8I6MXPktAiXIk= X-Google-Smtp-Source: ABdhPJz+3tWS+CQaf+IjI0+zVa2Ln9CP4xvEKxq7AwCLvCZScPsOkMVouDGDMKmcH0WFsW7qVaf+pQ== X-Received: by 2002:a1c:c3d5:: with SMTP id t204mr2463316wmf.114.1613739956319; Fri, 19 Feb 2021 05:05:56 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id w13sm12197829wrt.49.2021.02.19.05.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 05:05:55 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH v2] aio_suspend.3: SYNOPSIS: Use 'restrict' in prototypes Date: Fri, 19 Feb 2021 14:03:27 +0100 Message-Id: <20210219130326.12772-1-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <1950eeca-5627-93de-6fe9-22ebf189b37a@gmail.com> References: <1950eeca-5627-93de-6fe9-22ebf189b37a@gmail.com> 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 --- 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 " .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