From patchwork Wed Mar 10 18:31:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1450718 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=8.43.85.97; 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=Ke08bqCx; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 4DwgfX5ks0z9sS8 for ; Thu, 11 Mar 2021 05:32:20 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7456C3987C13; Wed, 10 Mar 2021 18:32:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7456C3987C13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615401132; bh=MYO3X/yjg3wkBx4QD0PRVd2tX8XIpNPx7l46JwQWDSY=; 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=Ke08bqCxNmRSP+eTEpPy4HHckgyiIs8KCO6MRH8s908qjMIxxfGcsoYM5/kLQLIFi ogkFIXSbbh6Il6Xk8fWBzfKLf7n9Wx5/gbsxw2LPp9yqR6yMVD5QeieZPfbtpqppbB 0HBwF44AU7eH4ekKfW5eS93LPEptCjIHrTLOL0hg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id E30C23857011 for ; Wed, 10 Mar 2021 18:32:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E30C23857011 Received: by mail-wr1-x429.google.com with SMTP id d15so24456202wrv.5 for ; Wed, 10 Mar 2021 10:32:08 -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=MYO3X/yjg3wkBx4QD0PRVd2tX8XIpNPx7l46JwQWDSY=; b=YVmuXxiemXXASkKI/HevH/XM190wbS0BdtxTygvXFst5ifyzFtULtiBepGhbVGP54e lSlY0MOYUYyxxHnVSlTRxHiyPGX2sMUgaqH7CtXh8QH5HdGSg/eJMqdqHDJz4c0/idYy YqE5d7kkHfodzGwK07HXX0ROeGU19eAPzLgBdLiwlAyRvKtMaxqwWkxoW5vbzWcGBBQL TZsgp0D8YqECC/sGjdHH9TGh+nSOzv6z5FZ1geVuN5lpz0s7DfjP5LXIzSlvQS//KMFy L2HxxAmDzaOSxlAjUV1QnxBeTAF+n/iataBMk0BCFnXcl7+NTKZ0KcmhWRMgEUqFGS0e Fmxw== X-Gm-Message-State: AOAM531bDlkYqSgqPP7bbgClOHJMqpNj290kA/bKMm9PPYUrdGKinNxB B/ltjD96mcWyMxHIvxhC164bQYaSqTKI4w== X-Google-Smtp-Source: ABdhPJz2reFKLc3m5cUFHhAswdT9TKX4RoB2rDx29NEdr1KkK0KUb0t3EKz047u2/O2znZrmB/8o1w== X-Received: by 2002:adf:b355:: with SMTP id k21mr4934029wrd.156.1615401128071; Wed, 10 Mar 2021 10:32:08 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id k11sm325374wmj.1.2021.03.10.10.32.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:32:07 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 02/24] sem_wait.3: SYNOPSIS: Use 'restrict' in prototypes Date: Wed, 10 Mar 2021 19:31:28 +0100 Message-Id: <20210310183149.194717-3-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com> References: <20210310183149.194717-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 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 Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in sem_timedwait(). Let's use it here too. .../glibc$ grep_glibc_prototype sem_timedwait sysdeps/pthread/semaphore.h:62: extern int sem_timedwait (sem_t *__restrict __sem, const struct timespec *__restrict __abstime) __nonnull ((1, 2)); .../glibc$ Signed-off-by: Alejandro Colomar --- man3/sem_wait.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/sem_wait.3 b/man3/sem_wait.3 index d57b6f6ce..da7ae72c2 100644 --- a/man3/sem_wait.3 +++ b/man3/sem_wait.3 @@ -31,7 +31,8 @@ sem_wait, sem_timedwait, sem_trywait \- lock a semaphore .PP .BI "int sem_wait(sem_t *" sem ); .BI "int sem_trywait(sem_t *" sem ); -.BI "int sem_timedwait(sem_t *" sem ", const struct timespec *" abs_timeout ); +.BI "int sem_timedwait(sem_t *restrict " sem , +.BI " const struct timespec *restrict " abs_timeout ); .fi .PP Link with \fI\-pthread\fP.