From c0dc758efda911b533c77eb8725236a182176e3e Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 28 Jul 2015 10:09:32 +0200 Subject: [PATCH] futex.2: Rewrap some source lines (no content changes) Signed-off-by: Michael Kerrisk --- man2/futex.2 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/man2/futex.2 b/man2/futex.2 index bad616dc7..744eac286 100644 --- a/man2/futex.2 +++ b/man2/futex.2 @@ -91,9 +91,8 @@ blocking via a futex is an atomic compare-and-block operation. .\" a detailed specification of the synchronization semantics. One example use of futexes is implementing locks. -The state of the lock (i.e., -acquired or not acquired) can be represented as an atomically accessed -flag in shared memory. +The state of the lock (i.e., acquired or not acquired) +can be represented as an atomically accessed flag in shared memory. In the uncontended case, a thread can access or modify the lock state with atomic instructions, for example atomically changing it from not acquired to acquired @@ -255,8 +254,8 @@ architecture). This load, the comparison with the expected value, and starting to sleep are performed atomically and totally ordered with respect to other futex operations on the same futex word. -If the thread starts to -sleep, it is considered a waiter on this futex word. +If the thread starts to sleep, +it is considered a waiter on this futex word. If the futex value does not match .IR val , then the call fails immediately with the error @@ -264,8 +263,8 @@ then the call fails immediately with the error The purpose of the comparison with the expected value is to prevent lost wake-ups: If another thread changed the value of the futex word after the -calling thread decided to block based on the prior value, and if the other -thread executed a +calling thread decided to block based on the prior value, +and if the other thread executed a .BR FUTEX_WAKE operation (or similar wake-up) after the value change and before this .BR FUTEX_WAIT