From patchwork Fri Mar 5 23:50:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 42344 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 C017E388A81E; Fri, 5 Mar 2021 23:51:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C017E388A81E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988285; bh=iXfj+ysqq81ozyYtY+Jv42rHAHmCy5CcVEwV8ZEX+XY=; 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=pFYiqlTIUtKoWlBNfk4R4Fun+SFMhWymdLQMJZeLhdG9DS2+M6vn7+OKLVikwIyn0 k3Ssvam2jlFPrMru92UjblA/157AtidKMROK3vhcqvuBFEEg0o/BNK80WLBQhMR8W4 TBSfWpdHxCgdgdU+PGaBWzzDVs3FS9lbs4TiwzEo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id 48F7C382D43C for ; Fri, 5 Mar 2021 23:51:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 48F7C382D43C Received: by mail-wm1-x335.google.com with SMTP id n11-20020a05600c4f8bb029010e5cf86347so1375581wmq.1 for ; Fri, 05 Mar 2021 15:51:22 -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=iXfj+ysqq81ozyYtY+Jv42rHAHmCy5CcVEwV8ZEX+XY=; b=rYhW7b/ZP/zQPYFWeWnetUie1PfZqkbneZfbaX79g86Xme1n85bGOwCWhSfY2Muyo3 18J1xML4t2emB9bX15SfEDELNmCwc6CNfKfCt6M+nOpqMnniXcPGuX/VTyHblQIRMIgK aNbg3TELG5XlcejYsXjhtCAx11VYR/bP3xEGANcpmglVGvUD+gocySShdMPCMgMfhOyS XeK5Rv7ZV1+dLEs5xdQWps7V8Iy3nJaEAFA3B4lW1FTfeCw4iWCHzi/n4f+3G4eq68vI AABppU3nGkfWSL1nXc84mdxaz/aNZl73yKD6wRrzA6/QhlFtDZJeIcZIoLBPszSecEPI T52w== X-Gm-Message-State: AOAM531EM6G+2woDKIlhE2KVeGSpTdgj+6QIKY6Kopo5ASt5GHqC1jD0 5Xa+cq3CVborsnf9CKKzviI= X-Google-Smtp-Source: ABdhPJzSeeXls5PCc8ijcdMrdAu2P0qo5ICQoo65/4aB6UlhHWujMHLQrVMc/Jrg/rawcJZf1Iu6+w== X-Received: by 2002:a1c:7916:: with SMTP id l22mr10895132wme.86.1614988281474; Fri, 05 Mar 2021 15:51:21 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:21 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 08/22] makecontext.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:50:52 +0100 Message-Id: <20210305235105.177359-9-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@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 Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX.1-2001 and glibc use 'restrict' in swapcontext(). Let's use it here too. .../glibc$ grep_glibc_prototype swapcontext stdlib/ucontext.h:41: extern int swapcontext (ucontext_t *__restrict __oucp, const ucontext_t *__restrict __ucp) __THROWNL __INDIRECT_RETURN; .../glibc$ Signed-off-by: Alejandro Colomar --- man3/makecontext.3 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man3/makecontext.3 b/man3/makecontext.3 index 83720dd2c..859181ddb 100644 --- a/man3/makecontext.3 +++ b/man3/makecontext.3 @@ -32,8 +32,10 @@ makecontext, swapcontext \- manipulate user context .nf .B #include .PP -.BI "void makecontext(ucontext_t *" ucp ", void (*" func ")(), int " argc ", ...);" -.BI "int swapcontext(ucontext_t *" oucp ", const ucontext_t *" ucp ); +.BI "void makecontext(ucontext_t *" ucp ", void (*" func ")(), int " argc \ +", ...);" +.BI "int swapcontext(ucontext_t *restrict " oucp , +.BI " const ucontext_t *restrict " ucp ); .fi .SH DESCRIPTION In a System V-like environment, one has the type