linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Alejandro Colomar <alx.manpages@gmail.com>
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
Date: Tue, 24 Nov 2020 10:50:29 +0100	[thread overview]
Message-ID: <b8c3ee44-91f7-ee0c-b39a-044459f3b456@gmail.com> (raw)
In-Reply-To: <20201123215911.7576-1-alx.manpages@gmail.com>

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 <alx.manpages@gmail.com>

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 <linux/unistd.h>
>  .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/

      reply	other threads:[~2020-11-24  9:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 21:59 [PATCH] set_tid_address.2: SYNOPSIS: Fix set_tid_address() return type Alejandro Colomar
2020-11-24  9:50 ` Michael Kerrisk (man-pages) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8c3ee44-91f7-ee0c-b39a-044459f3b456@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).