futex.2: Describe FUTEX_BITSET_MATCH_ANY

Describe FUTEX_BITSET_MATCH_ANY and FUTEX_WAIT and FUTEX_WAKE
equivalences.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-06-24 10:00:25 +02:00
parent 6c38ce7f1f
commit 678c99868e
1 changed files with 29 additions and 10 deletions

View File

@ -761,21 +761,40 @@ including those that are not interested in being woken up
.\" for efficiently implementing Pthreads APIs (which use absolute
.\" timeouts); FUTEX_WAIT provides only relative timeouts.
The constant
.BR FUTEX_BITSET_MATCH_ANY ,
which corresponds to all 32 bits set in the bit mask, can be used as the
.I val3
argument for
.BR FUTEX_WAIT_BITSET
and
.BR FUTEX_WAKE_BITSET .
Other than differences in the handling of the
.I timeout
argument, the
.BR FUTEX_WAIT
operation is equivalent to
.BR FUTEX_WAIT_BITSET
with
.IR val3
specified as
.BR FUTEX_BITSET_MATCH_ANY ;
that is, allow a wake-up by any waker.
The
.BR FUTEX_WAKE
operation is equivalent to
.BR FUTEX_WAKE_BITSET
with
.IR val3
specified as
.BR FUTEX_BITSET_MATCH_ANY ;
that is, wake up any waiter(s).
The
.I uaddr2
and
.I timeout
arguments are ignored.
The
.BR FUTEX_WAIT
and
.BR FUTEX_WAKE
operations correspond to
.BR FUTEX_WAIT_BITSET
and
.BR FUTEX_WAKE_BITSET
operations where the bit masks are all ones.
.\"
.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.\"