From 9f6c40c0e6cb8b27c4727cb9c099559007dc2d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D0=BA=20=D0=9A=D0=BE=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=B1=D0=B5=D1=80=D0=B3?= Date: Mon, 13 Aug 2012 14:25:13 +0200 Subject: [PATCH] futex.2: Consolidate error descriptions to ERRORS Signed-off-by: Michael Kerrisk --- man2/futex.2 | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/man2/futex.2 b/man2/futex.2 index 0235cbc74..fed044922 100644 --- a/man2/futex.2 +++ b/man2/futex.2 @@ -165,8 +165,6 @@ but first checks whether the location .I uaddr still contains the value .IR val3 . -If not, the operation fails with the error -.BR EAGAIN . The argument .I timeout is ignored. @@ -179,18 +177,6 @@ the returned value for a successful call can have differing meanings. Returns 0 if the process was woken by a .B FUTEX_WAKE call. -In case of timeout, -the operation fails with the error -.BR ETIMEDOUT . -If the futex was not equal to the expected value, -the operation fails with the error -.BR EWOULDBLOCK . -Signals (see -.BR signal (7)) -or other spurious wakeups cause -.B FUTEX_WAIT -to fail with the error -.BR EINTR . .TP .B FUTEX_WAKE Returns the number of processes woken up. @@ -214,7 +200,10 @@ No read access to futex memory. .TP .B EAGAIN .B FUTEX_CMP_REQUEUE -found an unexpected futex value. +detect that the value at +.I uaddr +is not equal to the expected value +.IR val3 . (This probably indicates a race; use the safe .B FUTEX_WAKE @@ -225,6 +214,12 @@ Error in getting .I timeout information from userspace. .TP +.B EINTR +.B FUTEX_WAIT +operation was interrupted by signal (see +.BR signal (7) +) or by other spurious wakeup. +.TP .B EINVAL An operation was not defined or error in page alignment. .TP @@ -234,6 +229,20 @@ The system limit on the total number of open files has been reached. .B ENOSYS Invalid operation specified in .IR op . +.TP +.B ETIMEDOUT +Timeout during the +.B FUTEX_WAIT +operation. +.TP +.B EWOULDBLOCK +The value, pointed to by +.I uaddr +was not equal to the expected value +.I val +at the moment of calling +.B FUTEX_WAIT +operation. .SH "VERSIONS" .PP Initial futex support was merged in Linux 2.5.7 but with different semantics