summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2014-07-06 09:13:40 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2014-07-06 09:13:40 +0200
commitb5693a38547297e600e6b840faf91c8523413efa (patch)
tree361bd2394640356cedf477701522b093435fbf89
parentb701f72de4b1afb78c6945eba197f3443b1c9535 (diff)
set_tid_address.2: Use "thread" rather than "process" in DESCRIPTION
Reported-by: Rich Felker <dalias@libc.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/set_tid_address.220
1 files 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.