futex.2: Various wording fix-ups

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-08-13 14:50:26 +02:00
parent 9f6c40c0e6
commit e808bba0ff
1 changed files with 21 additions and 17 deletions

View File

@ -14,7 +14,7 @@
.\" material in the kernel source file Documentation/pi-futex.txt. .\" material in the kernel source file Documentation/pi-futex.txt.
.\" 2.6.25 adds FUTEX_WAKE_BITSET, FUTEX_WAIT_BITSET .\" 2.6.25 adds FUTEX_WAKE_BITSET, FUTEX_WAIT_BITSET
.\" .\"
.TH FUTEX 2 2012-08-05 "Linux" "Linux Programmer's Manual" .TH FUTEX 2 2012-08-13 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
futex \- Fast Userspace Locking system call futex \- Fast Userspace Locking system call
.SH SYNOPSIS .SH SYNOPSIS
@ -165,18 +165,24 @@ but first checks whether the location
.I uaddr .I uaddr
still contains the value still contains the value
.IR val3 . .IR val3 .
If not, the operation fails with the error
.BR EAGAIN .
The argument The argument
.I timeout .I timeout
is ignored. is ignored.
.SH "RETURN VALUE" .SH "RETURN VALUE"
.PP .PP
Depending on which operation was executed, In the event of an error, all operations return \-1, and set
the returned value for a successful call can have differing meanings. .I errno
to indicate the error.
The return value on success depends on the operation,
as described in the following list:
.TP .TP
.B FUTEX_WAIT .B FUTEX_WAIT
Returns 0 if the process was woken by a Returns 0 if the process was woken by a
.B FUTEX_WAKE .B FUTEX_WAKE
call. call.
See ERRORS for the various possible error returns.
.TP .TP
.B FUTEX_WAKE .B FUTEX_WAKE
Returns the number of processes woken up. Returns the number of processes woken up.
@ -189,10 +195,6 @@ Returns the number of processes woken up.
.TP .TP
.B FUTEX_CMP_REQUEUE .B FUTEX_CMP_REQUEUE
Returns the number of processes woken up. Returns the number of processes woken up.
.PP
In the event of an error, all operations return \-1, and set
.I errno
to indicate the error.
.SH ERRORS .SH ERRORS
.TP .TP
.B EACCES .B EACCES
@ -200,7 +202,7 @@ No read access to futex memory.
.TP .TP
.B EAGAIN .B EAGAIN
.B FUTEX_CMP_REQUEUE .B FUTEX_CMP_REQUEUE
detect that the value at detected that the value pointed to by
.I uaddr .I uaddr
is not equal to the expected value is not equal to the expected value
.IR val3 . .IR val3 .
@ -210,18 +212,19 @@ use the safe
now.) now.)
.TP .TP
.B EFAULT .B EFAULT
Error in getting Error retrieving
.I timeout .I timeout
information from userspace. information from userspace.
.TP .TP
.B EINTR .B EINTR
A
.B FUTEX_WAIT .B FUTEX_WAIT
operation was interrupted by signal (see operation was interrupted by a signal (see
.BR signal (7) .BR signal (7))
) or by other spurious wakeup. or a spurious wakeup.
.TP .TP
.B EINVAL .B EINVAL
An operation was not defined or error in page alignment. An operation was not defined or there was error in page alignment.
.TP .TP
.B ENFILE .B ENFILE
The system limit on the total number of open files has been reached. The system limit on the total number of open files has been reached.
@ -236,13 +239,14 @@ Timeout during the
operation. operation.
.TP .TP
.B EWOULDBLOCK .B EWOULDBLOCK
The value, pointed to by .I op
was
.BR FUTEX_WAIT
and the value pointed to by
.I uaddr .I uaddr
was not equal to the expected value was not equal to the expected value
.I val .I val
at the moment of calling at the time of the call.
.B FUTEX_WAIT
operation.
.SH "VERSIONS" .SH "VERSIONS"
.PP .PP
Initial futex support was merged in Linux 2.5.7 but with different semantics Initial futex support was merged in Linux 2.5.7 but with different semantics