Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp41601pxu; Tue, 24 Nov 2020 18:00:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcTbf5szitQcBmKshlt3nTWmPcfw92qDJWocamQfaH8WOcxxPAAcu7JI8EtFj1Q/k0vIHP X-Received: by 2002:a50:9fe6:: with SMTP id c93mr1402475edf.30.1606269618296; Tue, 24 Nov 2020 18:00:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606269618; cv=none; d=google.com; s=arc-20160816; b=0lr+Wi2Qj1leUwcdhplqbJyLeApMQWSEkO3MlLrNtQeqalKvyr5597orWECmiNtaHG iNar3u0Y3usd7Hs7wIUaoBgM0jwjjy+OiGsArCDI4tKngJUYIZKL8oF28G3N0EAz/s8N rd7KxTvggf/HKUOgsidx480CXXwJkU6zwnFR3FhQ+ojiwPpu5ZKinFnl2OaCqeM8WaOS QSGpu7JNfs4PpkabUlcdLR0SMvghIgdDPpOSqFb3SgpKqLFtr6+Iq9d7yf1iBIIYtbNo ZZtJhvrxv3usWFOfyMLBLDdCz7ZK5nshKNGtHdTPAuNe7tCswKEGHNG8JyeyxFzLrc7o eaOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:cc:dkim-signature; bh=ytqY2Kta/VT9WRzycnbHe2+qadbmffHx1RuPAjT9P+M=; b=cpcomnvNYDXy/EdobBWRnZQgN+PU6No+VZfg6Tv4eVz1MWFpPH5cTaBsN4PBc9PgMj iziOjQlUaJpKr6x4GX865T7gp0UguWuetLfHuLa6+n+zeScVQl5pby7HTVfwmisabd52 WU5HBNauzYJWX33q6myD91fWVYI6YPlNswG+5FFzD2ABWEcqwWMM8hU8SYbOnRYr2bDG P0dmX0uZd/B7k8aPQg5kPnigINzi5JNmS+fBXTGhLE8MA+NOP56rgN/ML80LBfYLbZtV JBoLYHuFFz7EJHYfU0h5khPsTLBYEOACPLBYZCcMJwAAUWqFIh5r8MZzGGQnmo1gOymt 7l7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=REBujwmM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bl4si463715ejb.642.2020.11.24.17.59.55; Tue, 24 Nov 2020 18:00:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=REBujwmM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731478AbgKXJud (ORCPT + 99 others); Tue, 24 Nov 2020 04:50:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728886AbgKXJuc (ORCPT ); Tue, 24 Nov 2020 04:50:32 -0500 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6A3FC0613D6; Tue, 24 Nov 2020 01:50:31 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id d142so1820115wmd.4; Tue, 24 Nov 2020 01:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=cc:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ytqY2Kta/VT9WRzycnbHe2+qadbmffHx1RuPAjT9P+M=; b=REBujwmMsE/IcjcGZLUPk2jAvBtRhqBa7cNuMVsLB1cGchTjqtRjv8/ryA8LaBv/8a w6YBT56rywVqcp1qkQWtI1nCmRkYnJ2Q018EQcGDkfZB9Rr21bfS1ZC9R6w+CV9g2sXa /BletmLQqNAatYNgUXp18gH4n8K49Yb9z/QNSE4YWyZcoQqClfoZVatnKxIMGFgNejLW kUnNLihBFwpTTCL3/9MAORVd6+vMGdbQRTcuWWUfLBvD198sHex0I5NsIQvEcZuPRU9x HbL5c8yJvbzyCG72kCKbS7TchaBrkhNlGb5ONpKqYWRXSPUq15TSK5l5eNm7qGSuXco3 ZfHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ytqY2Kta/VT9WRzycnbHe2+qadbmffHx1RuPAjT9P+M=; b=Oe6vyQ8YSHs2Fq54SWXcegzXxVy20sw82Kd7oGffcM1tDvCkwzVTvUD/LlCN075PLm riJSzSIkVo3RHdyyY1ks9TpJUE9xv9egR4glZFYcAgWoHjjoYU+6BnNS9UZOsuqoYvF8 nG4EHwDynjyjDkOwwN077Jtm7uKONZ33hbJLWZXzXBEqA8nry9tIJKkPJf4l5qD2s1u1 fhUV4KngfMr3qVbo9ozmu8SrF5TmFpzMbxnygLkxCKHihw4wettMwuuuhVXZlltBS55M 194gXgjSPJag+d6m3yyoS/DyTh21woDBJWIq9SvX7+p5BNg5NltYgiVlAG+Z++hOdzzo 5+Dg== X-Gm-Message-State: AOAM530DedGs7MiAHcQ+zRv6Wx7Y42wxy/P4ms4pTyMmKadHBjZvHmIG w+K2lc0fmZpM8YyIdkh1EFk= X-Received: by 2002:a1c:2b05:: with SMTP id r5mr3341075wmr.179.1606211430596; Tue, 24 Nov 2020 01:50:30 -0800 (PST) Received: from ?IPv6:2001:a61:24b3:de01:7310:e730:497d:ea6a? ([2001:a61:24b3:de01:7310:e730:497d:ea6a]) by smtp.gmail.com with ESMTPSA id a18sm4301676wme.18.2020.11.24.01.50.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Nov 2020 01:50:29 -0800 (PST) Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, linux-kernel@vger.kernel.org, libc-alpha@sourceware.org Subject: Re: [PATCH] set_tid_address.2: SYNOPSIS: Fix set_tid_address() return type To: Alejandro Colomar References: <20201123215911.7576-1-alx.manpages@gmail.com> From: "Michael Kerrisk (man-pages)" Message-ID: Date: Tue, 24 Nov 2020 10:50:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201123215911.7576-1-alx.manpages@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alex, On 11/23/20 10:59 PM, Alejandro Colomar wrote: > The Linux kernel uses 'pid_t' instead of 'long' for the return type. > As glibc provides no wrapper, use the same types the kernel uses. > > $ sed -n 34,36p man-pages/man2/set_tid_address.2 > .PP > .IR Note : > There is no glibc wrapper for this system call; see NOTES. > > $ grep -rn 'SYSCALL_DEFINE.*set_tid_address' linux/ > linux/kernel/fork.c:1632: > SYSCALL_DEFINE1(set_tid_address, int __user *, tidptr) > > $ sed -n 1632,1638p linux/kernel/fork.c > SYSCALL_DEFINE1(set_tid_address, int __user *, tidptr) > { > current->clear_child_tid = tidptr; > > return task_pid_vnr(current); > } > > $ grep -rn 'task_pid_vnr(struct' linux/ > linux/include/linux/sched.h:1374: > static inline pid_t task_pid_vnr(struct task_struct *tsk) > > Signed-off-by: Alejandro Colomar Thanks! Patch applied. Cheers, Michael > --- > man2/set_tid_address.2 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/man2/set_tid_address.2 b/man2/set_tid_address.2 > index 380efcdd8..b18b8efef 100644 > --- a/man2/set_tid_address.2 > +++ b/man2/set_tid_address.2 > @@ -29,7 +29,7 @@ set_tid_address \- set pointer to thread ID > .nf > .B #include > .PP > -.BI "long set_tid_address(int *" tidptr ); > +.BI "pid_t set_tid_address(int *" tidptr ); > .fi > .PP > .IR Note : > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/