futex.2: Replace instances of EWOULDBLOCK by EAGAIN

On Linux, the two error numbers are the same. The kernel
code for futexes is somehwat inconsistent, using EAGAIN
in some places, and EWOULDBLOCK in others. Let's make the
manual page consistent at least.

This change requires reordering of one entry in ERRORS.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-01-14 17:16:58 +01:00
parent fa0388c309
commit badbf70cad
1 changed files with 10 additions and 10 deletions

View File

@ -179,7 +179,7 @@ The test and sleep steps are performed atomically.
If the futex value does not match
.IR val ,
then the call fails immediately with the error
.BR EWOULDBLOCK .
.BR EAGAIN .
.\" FIXME I added the following sentence. Please confirm that it is correct.
The purpose of the test step is to detect races where
another process changes that value of the futex between
@ -781,7 +781,7 @@ bit is set.
.\" FIXME How does the situation in the previous sentence come about?
.\" Probably it would be helpful to say something about that in
.\" the man page.
.\" FIXME And *how* does FUTEX_TRYLOCK_PI deal with that situation?
.\" FIXME And *how* does FUTEX_TRYLOCK_PI deal with this situation?
User space cannot handle this race free.
.TP
.BR FUTEX_UNLOCK_PI " (since Linux 2.6.18)"
@ -902,6 +902,14 @@ Returns 0 if the caller was successfully requeued to the futex at
No read access to futex memory.
.TP
.B EAGAIN
.RB ( FUTEX_WAIT )
The value pointed to by
.I uaddr
was not equal to the expected value
.I val
at the time of the call.
.TP
.B EAGAIN
.B FUTEX_CMP_REQUEUE
detected that the value pointed to by
.I uaddr
@ -1099,14 +1107,6 @@ The operation in
employed the timeout specified in
.IR timeout ,
and the timeout expired before the operation completed.
.TP
.B EWOULDBLOCK
.RB ( FUTEX_WAIT )
The value pointed to by
.I uaddr
was not equal to the expected value
.I val
at the time of the call.
.SH VERSIONS
.PP
Futexes were first made available in a stable kernel release