mirror of https://github.com/mkerrisk/man-pages
futex.2: Reword paragraph describing futex word
Reported-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
02f7b623c9
commit
7e8dcabcb1
22
man2/futex.2
22
man2/futex.2
|
@ -50,14 +50,22 @@ a longer time until the condition becomes true.
|
|||
The program uses another operation of the system call to wake
|
||||
anyone waiting for a particular condition.
|
||||
|
||||
The condition is represented by the futex word, which is an address
|
||||
in memory supplied to the
|
||||
A futex is a 32-bit value\(emreferred to below as a
|
||||
.IR "futex word" \(emwhose
|
||||
address is supplied to the
|
||||
.BR futex ()
|
||||
system call, and the 32-bit value at this memory location.
|
||||
(While the virtual addresses for the same physical memory address
|
||||
in separate processes may be different,
|
||||
the same physical address may be shared by the processes using
|
||||
.BR mmap (2).)
|
||||
system call.
|
||||
(Futexes are 32-bits in size on all platforms, including 64-bit systems.)
|
||||
All futex operations are governed by this value.
|
||||
In order to share a futex between processes,
|
||||
the futex is placed in a region of shared memory,
|
||||
created using (for example)
|
||||
.BR mmap (2)
|
||||
or
|
||||
.BR shmat (2).
|
||||
(Thus the futex word may have different
|
||||
virtual addresses in different processes,
|
||||
but these addresses all refer to the same location in physical memory.)
|
||||
|
||||
When executing a futex operation that requests to block a thread,
|
||||
the kernel will block only if the futex word has the value that the
|
||||
|
|
Loading…
Reference in New Issue