diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-06-24 10:20:40 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-06-26 11:25:22 +0200 |
| commit | 4100abc52e9cfc9b3c15deff58bd10baf9a91ed8 (patch) | |
| tree | 5e4b83c49696f62be2d4ecb7119177f6b70d59fc | |
| parent | 678c99868e1d3668eb290acd55432e3e35d1e122 (diff) | |
| download | man-pages-4100abc52e9cfc9b3c15deff58bd10baf9a91ed8.tar.gz | |
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>
| -rw-r--r-- | man2/futex.2 | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/man2/futex.2 b/man2/futex.2 index 671b9edb9e..d8e7eddeae 100644 --- a/man2/futex.2 +++ b/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 |
