From patchwork Sun Feb 7 12:46:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 41956 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 732003857C78; Sun, 7 Feb 2021 12:47:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 732003857C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1612702036; bh=b57W89tA9xzaH0VgMiRuBgV5u6SIKfPkrvfSv++KQuA=; 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=AdWClTa5M71Gq4AGeIHZtIj+6xkyIgHwpRqgrPfkL6YEB1Vg12VmydREognBqwL+I zGBtwGV7W/+KrwPZEjPi97gXIb91EAAxdqk4HnpBUzGpE7wvu3SdAV1fbd1dUucG6c 71oMQzEbDEhtJpeXGoWJpj5AFGYkPp6z7EmefDm8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id E68863857C4F for ; Sun, 7 Feb 2021 12:47:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E68863857C4F Received: by mail-wr1-x431.google.com with SMTP id c12so13765946wrc.7 for ; Sun, 07 Feb 2021 04:47:14 -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=b57W89tA9xzaH0VgMiRuBgV5u6SIKfPkrvfSv++KQuA=; b=tF1+E+orpimwfIc5et5oYWKKlwtN09Zj6wvFGMJdejwc3qOGtw+pgfrPuAh5JLijS7 BsVTSND+WYRQl3W0SyKgp9P4PMiVpAk6IVROF8rOhN7gYNY1eoPZhwCXQo4UOnfGgFZY n6QvmicbcSDC4PJnEgL2FqKVFX3pYgZVJ6prlbndznPg5Yxi2A5UBEU5BY1hlr+Q74Re JGv8hX/xFE/J7w5DQFObCZGIuoDCgrsdq0RH8rRNB1pnZzdCp1kx83mAyOsFWT0xWKkj zYEeFD5J8QGQxp9+1M18h3+3lNVpEqkl0rhNg3EVJUhY9k8SzDg4uR/IXomavFf/2hlF Sjog== X-Gm-Message-State: AOAM533NEolhZRRfF10sTpWYlB9vFvIjs4satNNwdUmU538dX/1hYEWF lu+m+tHrJk+sAIWD5+axtQM= X-Google-Smtp-Source: ABdhPJwAWWOSWsCwB9BWUvliAxXkJjg5uTNVGwYp3Ium5aQkZO00bKRQnM4tZ27khbvIXnbwCnysuw== X-Received: by 2002:adf:dcd2:: with SMTP id x18mr2138673wrm.355.1612702033817; Sun, 07 Feb 2021 04:47:13 -0800 (PST) Received: from localhost.localdomain ([170.253.49.0]) by smtp.googlemail.com with ESMTPSA id s4sm20767195wrt.85.2021.02.07.04.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 04:47:13 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH v2] mlock.2: mlock2(): Fix prototype parameter types Date: Sun, 7 Feb 2021 13:46:12 +0100 Message-Id: <20210207124611.201122-1-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204111732.194599-1-alx.manpages@gmail.com> References: <20210204111732.194599-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 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" The documented prototype for mlock2() was a mix of the glibc wrapper prototype and the kernel syscall prototype. Let's document the glibc wrapper prototype, which is shown below. ...... .../glibc$ grep_glibc_prototype mlock2 sysdeps/unix/sysv/linux/bits/mman-shared.h:55: int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __THROW; .../glibc$ function grep_glibc_prototype() { if ! [ -v 1 ]; then >&2 echo "Usage: ${FUNCNAME[0]} "; return ${EX_USAGE}; fi find * -type f \ |grep '\.h$' \ |sort -V \ |xargs pcregrep -Mn \ "(?s)^[^\s#][\w\s]+\s+\**${1}\s*\([\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \ |sed -E 's/^[^:]+:[0-9]+:/&\n/'; } Signed-off-by: Alejandro Colomar --- man2/mlock.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man2/mlock.2 b/man2/mlock.2 index 2822df7cf..f48d632c4 100644 --- a/man2/mlock.2 +++ b/man2/mlock.2 @@ -31,7 +31,7 @@ mlock, mlock2, munlock, mlockall, munlockall \- lock and unlock memory .B #include .PP .BI "int mlock(const void *" addr ", size_t " len ); -.BI "int mlock2(const void *" addr ", size_t " len ", int " flags ); +.BI "int mlock2(const void *" addr ", size_t " len ", unsigned int " flags ); .BI "int munlock(const void *" addr ", size_t " len ); .PP .BI "int mlockall(int " flags );