mirror of https://github.com/mkerrisk/man-pages
set_tid_address.2: Some rewordings and minor clarifications
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
72442c6803
commit
4e9ee22571
|
@ -70,15 +70,19 @@ sets the
|
||||||
value for the calling process to
|
value for the calling process to
|
||||||
.IR tidptr .
|
.IR tidptr .
|
||||||
.LP
|
.LP
|
||||||
When
|
When a process whose
|
||||||
.I clear_child_tid
|
.I clear_child_tid
|
||||||
is set, and the process exits, and the process was sharing memory
|
is not NULL terminates, then,
|
||||||
with other processes or threads, then 0 is written at this address,
|
if the process is sharing memory with other processes or threads,
|
||||||
and a
|
then 0 is written at the address specified in
|
||||||
.I futex(child_tidptr, FUTEX_WAKE, 1, NULL, NULL, 0);
|
.I clear_child_tid
|
||||||
call is done.
|
and the kernel performs the following operation:
|
||||||
(That is, wake a single process waiting on this futex.)
|
|
||||||
Errors are ignored.
|
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"
|
.SH "RETURN VALUE"
|
||||||
.BR set_tid_address ()
|
.BR set_tid_address ()
|
||||||
always returns the PID of the calling process.
|
always returns the PID of the calling process.
|
||||||
|
|
Loading…
Reference in New Issue