mirror of https://github.com/mkerrisk/man-pages
futex.2: explanation of blocking behavior
Shorten overlong sentence. Highlight futex(). Tfix. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
344df36631
commit
b80daba225
12
man2/futex.2
12
man2/futex.2
|
@ -59,16 +59,18 @@ in separate processes may be different,
|
|||
the same physical address may be shared by the processes using
|
||||
.BR mmap (2).)
|
||||
|
||||
When executing a futex operation that requests to block a thread,
|
||||
When executing a
|
||||
.BR futex ()
|
||||
operation that requests to block a thread,
|
||||
the kernel will only block if the futex word has the value that the
|
||||
calling thread supplied as expected value.
|
||||
The load from the futex word, the comparison with
|
||||
the expected value,
|
||||
and the actual blocking will happen atomically and totally
|
||||
ordered with respect to concurrently executing futex operations
|
||||
on the same futex word,
|
||||
such as operations that wake threads blocked on this futex word.
|
||||
Thus, the futex word is used to connect the synchronization in user spac
|
||||
ordered with respect to concurrently executing
|
||||
.BR futex ()
|
||||
operations on the same futex word.
|
||||
Thus, the futex word is used to connect the synchronization in user space
|
||||
with the implementation of blocking by the kernel; similar to an atomic
|
||||
compare-and-exchange operation that potentially changes shared memory,
|
||||
blocking via a futex is an atomic compare-and-block operation.
|
||||
|
|
Loading…
Reference in New Issue