From b5693a38547297e600e6b840faf91c8523413efa Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sun, 6 Jul 2014 09:13:40 +0200 Subject: [PATCH] set_tid_address.2: Use "thread" rather than "process" in DESCRIPTION Reported-by: Rich Felker Signed-off-by: Michael Kerrisk --- man2/set_tid_address.2 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/man2/set_tid_address.2 b/man2/set_tid_address.2 index 9bdbf1200..5cfa6faff 100644 --- a/man2/set_tid_address.2 +++ b/man2/set_tid_address.2 @@ -32,14 +32,14 @@ set_tid_address \- set pointer to thread ID .BI "long set_tid_address(int *" tidptr ); .fi .SH DESCRIPTION -For each process, the kernel maintains two attributes (addresses) called +For each thread, the kernel maintains two attributes (addresses) called .I set_child_tid and .IR clear_child_tid . These two attributes contain the value NULL by default. .TP .I set_child_tid -If a process is started using +If a thread is started using .BR clone (2) with the .B CLONE_CHILD_SETTID @@ -51,11 +51,11 @@ argument of that system call. .IP When .I set_child_tid -is set, the very first thing the new process does -is writing its PID at this address. +is set, the very first thing the new thread does +is to write its thread ID at this address. .TP .I clear_child_tid -If a process is started using +If a thread is started using .BR clone (2) with the .B CLONE_CHILD_CLEARTID @@ -69,25 +69,25 @@ The system call .BR set_tid_address () sets the .I clear_child_tid -value for the calling process to +value for the calling thread to .IR tidptr . .LP -When a process whose +When a thread whose .I clear_child_tid is not NULL terminates, then, -if the process is sharing memory with other processes or threads, +if the thread is sharing memory with other threads, then 0 is written at the address specified in .I clear_child_tid and the kernel performs the following operation: futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0); -The effect of this operation is to wake a single process that +The effect of this operation is to wake a single thread that is performing a futex wait on the memory location. Errors from the futex wake operation are ignored. .SH RETURN VALUE .BR set_tid_address () -always returns the PID of the calling process. +always returns the caller's thread ID. .SH ERRORS .BR set_tid_address () always succeeds.