set_tid_address.2: Some rewordings and minor clarifications

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-07-21 05:09:45 +02:00
parent 72442c6803
commit 4e9ee22571
1 changed files with 12 additions and 8 deletions

View File

@ -70,15 +70,19 @@ sets the
value for the calling process to
.IR tidptr .
.LP
When
When a process whose
.I clear_child_tid
is set, and the process exits, and the process was sharing memory
with other processes or threads, then 0 is written at this address,
and a
.I futex(child_tidptr, FUTEX_WAKE, 1, NULL, NULL, 0);
call is done.
(That is, wake a single process waiting on this futex.)
Errors are ignored.
is not NULL terminates, then,
if the process is sharing memory with other processes or 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
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.