mirror of https://github.com/mkerrisk/man-pages
futex.2: Explain how to get equivalent of FUTEX_WAIT with an absolute timeout
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
678c99868e
commit
4100abc52e
20
man2/futex.2
20
man2/futex.2
|
@ -302,7 +302,6 @@ value change and will not start to sleep.
|
|||
If the
|
||||
.I timeout
|
||||
is not NULL, the structure it points to specifies a
|
||||
.I relative
|
||||
timeout for the wait.
|
||||
(This interval will be rounded up to the system clock granularity,
|
||||
and is guaranteed not to expire early.)
|
||||
|
@ -318,6 +317,25 @@ If
|
|||
.I timeout
|
||||
is NULL, the call blocks indefinitely.
|
||||
|
||||
.IR Note :
|
||||
for
|
||||
.BR FUTEX_WAIT ,
|
||||
.IR timeout
|
||||
is interpreted as a
|
||||
.IR relative
|
||||
value.
|
||||
This differs from other futex operations, where
|
||||
.I timeout
|
||||
is interpreted as an absolute value.
|
||||
To obtain the equivalent of
|
||||
.BR FUTEX_WAIT
|
||||
with an absolute timeout, employ
|
||||
.BR FUTEX_WAIT_BITSET
|
||||
with
|
||||
.IR val3
|
||||
specified as
|
||||
.BR FUTEX_BITSET_MATCH_ANY .
|
||||
|
||||
The arguments
|
||||
.I uaddr2
|
||||
and
|
||||
|
|
Loading…
Reference in New Issue