mirror of https://github.com/mkerrisk/man-pages
futex.2: Warn that FUTEX_REQUEUE should be avoided in favor of FUTEX_CMP_REQUEUE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
6bac3b8517
commit
4ac63a6c1a
10
man2/futex.2
10
man2/futex.2
|
@ -429,6 +429,14 @@ has been removed from Linux 2.6.26 onward.
|
||||||
.TP
|
.TP
|
||||||
.BR FUTEX_REQUEUE " (since Linux 2.6.0)"
|
.BR FUTEX_REQUEUE " (since Linux 2.6.0)"
|
||||||
.\" Strictly speaking: from Linux 2.5.70
|
.\" Strictly speaking: from Linux 2.5.70
|
||||||
|
.\"
|
||||||
|
.\" FIXME I added this warning. Okay?
|
||||||
|
.IR "Avoid using this operation" .
|
||||||
|
It is broken (unavoidably racey) for its intended purpose.
|
||||||
|
Use
|
||||||
|
.BR FUTEX_CMP_REQUEUE
|
||||||
|
instead.
|
||||||
|
|
||||||
This operation was introduced in order to avoid a "thundering herd" effect
|
This operation was introduced in order to avoid a "thundering herd" effect
|
||||||
when
|
when
|
||||||
.B FUTEX_WAKE
|
.B FUTEX_WAKE
|
||||||
|
@ -461,8 +469,6 @@ There was a race in the intended use of
|
||||||
so
|
so
|
||||||
.B FUTEX_CMP_REQUEUE
|
.B FUTEX_CMP_REQUEUE
|
||||||
was introduced.
|
was introduced.
|
||||||
.\" FIXME should there be a statement in the description of FUTEX_REQUEUE
|
|
||||||
.\" to say that it should be avoided in favor of FUTEX_CMP_REQUEUE?
|
|
||||||
This operation is similar to
|
This operation is similar to
|
||||||
.BR FUTEX_REQUEUE ,
|
.BR FUTEX_REQUEUE ,
|
||||||
but first checks whether the location
|
but first checks whether the location
|
||||||
|
|
Loading…
Reference in New Issue