futex.2: Rewrite the intro paragraphs a little

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-01-13 08:48:54 +01:00
parent 66d1619c62
commit f388ba704e
1 changed files with 15 additions and 10 deletions

View File

@ -76,14 +76,15 @@ implement the contended case of a lock in shared memory, as
described in
.BR futex (7).
.PP
When a
.BR futex (7)
operation did not finish uncontended in user space, a call needs to be made
to the kernel to arbitrate.
When a futex operation did not finish uncontended in user space, a
.BR futex ()
call needs to be made to the kernel to arbitrate.
Arbitration can either mean putting the calling
process to sleep or, conversely, waking a waiting process.
.PP
Callers of this function are expected to adhere to the semantics as set out in
Callers of
.BR futex ()
are expected to adhere to the semantics described in
.BR futex (7).
As these
semantics involve writing nonportable assembly instructions, this in turn
@ -92,11 +93,15 @@ general application developers.
.PP
The
.I uaddr
argument needs to point to an aligned integer which stores the counter.
The operation to execute is passed via the
.I op
argument, along with a value
.IR val .
argument points to an integer which stores the counter (futex).
On all platforms, futexes are four-byte integers that
must be aligned on a four-byte boundary.
The operation to perform on the futex is specified in the
.I futex_op
argument;
.IR val
is a value whose meaning and purpose depends on
.IR futex_op .
.PP
The
.I futex_op