From 7e8dcabcb1aacda474d0121e67d493b2ecfbe6b7 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 28 Jul 2015 09:38:47 +0200 Subject: [PATCH] futex.2: Reword paragraph describing futex word Reported-by: Davidlohr Bueso Signed-off-by: Michael Kerrisk --- man2/futex.2 | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/man2/futex.2 b/man2/futex.2 index 91518979d..9ac4dd5b5 100644 --- a/man2/futex.2 +++ b/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