futex.2: Replace "bitset" by "bit mask"

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-12-19 06:10:00 +01:00
parent 77227d3697
commit 5e1456d4c9
1 changed files with 13 additions and 13 deletions

View File

@ -682,8 +682,8 @@ This operation is like
.BR FUTEX_WAIT
except that
.I val3
is used to provide a 32-bit bitset to the kernel.
This bitset is stored in the kernel-internal state of the waiter.
is used to provide a 32-bit mask to the kernel.
This bit mask is stored in the kernel-internal state of the waiter.
See the description of
.BR FUTEX_WAKE_BITSET
for further details.
@ -711,13 +711,13 @@ This operation is the same as
.BR FUTEX_WAKE
except that the
.I val3
argument is used to provide a 32-bit bitset to the kernel.
This bitset is used to select which waiters should be woken up.
The selection is done by a bit-wise AND of the "wake" bitset
argument is used to provide a 32-bit bit mask to the kernel.
This bit mask is used to select which waiters should be woken up.
The selection is done by a bit-wise AND of the "wake" bit mask
(i.e., the value in
.IR val3 )
and the bitset which is stored in the kernel-internal
state of the waiter (the "wait" bitset that is set using
and the bit mask which is stored in the kernel-internal
state of the waiter (the "wait" bit mask that is set using
.BR FUTEX_WAIT_BITSET ).
All of the waiters for which the result of the AND is nonzero are woken up;
the remaining waiters are left sleeping.
@ -729,12 +729,12 @@ and
is to allow selective wake-ups among multiple waiters that are blocked
on the same futex.
However, note that, depending on the use case,
employing this bitset multiplexing feature on a
employing this bit-mask multiplexing feature on a
futex can be less efficient than simply using multiple futexes,
because employing bitset multiplexing requires the kernel
because employing bit-mask multiplexing requires the kernel
to check all waiters on a futex,
including those that are not interested in being woken up
(i.e., they do not have the relevant bit set in their "wait" bitset).
(i.e., they do not have the relevant bit set in their "wait" bit mask).
.\" According to http://locklessinc.com/articles/futex_cheat_sheet/:
.\"
.\" "The original reason for the addition of these extensions
@ -744,7 +744,7 @@ including those that are not interested in being woken up
.\" without the bitset parameter being all ones.
.\"
.\" The page goes on to note that the FUTEX_WAIT_BITSET operation
.\" is nevertheless used (with a bitset of all ones) in order to
.\" is nevertheless used (with a bit mask of all ones) in order to
.\" obtain the absolute timeout functionality that is useful
.\" for efficiently implementing Pthreads APIs (which use absolute
.\" timeouts); FUTEX_WAIT provides only relative timeouts.
@ -763,7 +763,7 @@ operations correspond to
.BR FUTEX_WAIT_BITSET
and
.BR FUTEX_WAKE_BITSET
operations where the bitsets are all ones.
operations where the bit masks are all ones.
.\"
.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.\"
@ -1435,7 +1435,7 @@ the address is not four-byte-aligned.
.B EINVAL
.RB ( FUTEX_WAIT_BITSET ,
.BR FUTEX_WAKE_BITSET )
The bitset supplied in
The bit mask supplied in
.IR val3
is zero.
.TP