Michael Kerrisk
627b50ce7c
futex.2: Elaborate on why "requeue" operations can be preferable to FUTEX_WAKE
...
Cowritten-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
8297383e9e
futex.2: Clean-ups and FIXME removeal after feedback from Thomas Gleixner
...
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
27dd3a6e79
futex.2: Remove warning that FUTEX_REQUEUE is broken
...
Darren Hart pointed me to the comments from Rich Felker
that there are valid use cases for FUTEX_REQUEUE.
From: Rich Felker <dalias@libc.org>
Date: Wed, 29 Oct 2014 22:43:17 -0400
To: Darren Hart <dvhart@infradead.org>
Cc: GLIBC Devel <libc-alpha@sourceware.org>, ...
Subject: Re: Add futex wrapper to glibc?
On Wed, Oct 29, 2014 at 06:59:15PM -0700, Darren Hart wrote:
[...]
> I wonder though... can we not wrap FUTEX_REQUEUE? It's fundamentally
> broken. FUTEX_CMP_REQUEUE should *always* be used instead. The glibc
> wrapper is one way to encourage developers to do the right thing
> (don't expose the bad op in the header).
You're mistaken here. There are plenty of valid ways to use
FUTEX_REQUEUE - for example if the calling thread is requeuing the
target(s) to a lock that the calling thread owns. Just because it
doesn't meet the needs of the way glibc was using it internally
doesn't mean it's useless for other applications.
Reported-by: Darren Hart <dvhart@infradead.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
da56650ae4
futex.2: srcfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
fd1056148b
futex.2: Minor wording fixes
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
55f9e85ead
futex.2: Minor wording fixes
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
b0f35fbb09
futex.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
c0dc758efd
futex.2: Rewrap some source lines (no content changes)
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
9d32a39b82
futex.2: Minor wording fixes
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
d45f244c6d
futex.2: Minor wording fixes
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
7e8dcabcb1
futex.2: Reword paragraph describing futex word
...
Reported-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
02f7b623c9
futex.2: NOTES: futexes are also used to implement read-write locks and barriers
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
e0074751c9
futex.2: SEE ALSO: add pthread_mutexattr_getprotocol(3)
...
Reported-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
36a90a75ce
futex.2: wfix
...
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
d6bb5a38db
futex.2: Tidy up some FIXMEs
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
cf44281c66
futex.2: Point out that futexes are used to implement higher-level abstractions
...
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Torvald Riegel <triegel@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
78bbcd9faf
futex.2: Remove an obsolete FIXME
...
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
cabee29d5e
futex.2: tfix
...
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
e61abc2018
futex.2: tfix
...
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
a5c5a06aba
futex.2: Clarify return value details
...
Reporte-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
943ccc5228
futex.2: Remove detail about kernel internals
...
As commented on by Davidlohr Bueso:
This to me reads a bit too much into the kernel (fastpath,
refcnt, vmas). Why not just mention that it avoids overhead
in the kernel or something? I don't recall any manpage
mentioning such details, but I could be wrong.
Reported-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Heinrich Schuchardt
10022b8e63
futex.2: Casting utime to uint32_t
...
The kernel uses the following cast:
if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE ||
cmd == FUTEX_CMP_REQUEUE_PI || cmd == FUTEX_WAKE_OP)
val2 = (u32) (unsigned long) utime;
This ensures that always the least significant four bytes of the
pointer are used, both on ILP32 and LP64 systems.
On a big endian system a simple cast from 64 bit pointer to 32 bit
integer would return the most significant four bytes.
We have to make the reader of the man-page aware of the usage
of the least significant bytes.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Heinrich Schuchardt
c6dc40a2c9
futex.2: Use known types
...
Type u32 is not exposed to the user. Instead, refer to uint32_t,
which is defined in ISO/IEC 9899:1999.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Heinrich Schuchardt
d725ab772e
futex.2: tfix
...
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
78e856927e
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Michael Kerrisk
0c3ec26b07
futex.2: Minor wording fixes
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Heinrich Schuchardt
8e754e12c5
futex.2: explanation of blocking
...
Use shorter sentences.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:48 +01:00
Heinrich Schuchardt
b80daba225
futex.2: explanation of blocking behavior
...
Shorten overlong sentence.
Highlight futex().
Tfix.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Heinrich Schuchardt
344df36631
futex.2: clarify address mapping
...
Using the word "physical" address should make the text easier to
make.
Avoid negations like "may not be equal".
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Heinrich Schuchardt
594536fb2c
futex.2: tfix
...
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
4c8cb0ffe6
futex.2: Rewrap some long source lines
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
83e80dda44
futex.2: ffix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Heinrich Schuchardt
63ad44cb92
futex.2: simplify example
...
Do not duplicate coding.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Heinrich Schuchardt
92a4669004
futex.2: futex.2: Fix error check in EXAMPLE: fork() fails with -1
...
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
357646628c
futex.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
077981d467
futex.2: Wrap sentences at line boundaries
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
74f58a643b
futex.2: Explicitly mark FIXMEs added by Torvald Riegel
...
Mainly so I can keep track of who said what should be fixed/checked
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Torvald Riegel
4b35dc5dab
futex.2: Terminology fixes
...
Here is the result of a first pass over futex.2. I tried to
do nothing that is too controversial. I tried to apply the
terminology that at least Darren and I had in mind
consistently; but please check again.
The major changes are in how futexes are described in the
introductory parts of the page. I hope it's easier to understand
now. I've also tried to add some more precision to the the
description of the synchronization semantics (e.g., it makes a
difference whether we claim something is atomic (without further
qualification), or just atomic wrt. other futex operations).
In some cases, that adds some verbosity to the text -- but I
believe that this is worth the clarity and consistency in using
terms, for example.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
77da5febea
futex.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
305cc4153b
futex.2: Add EXAMPLE program
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
02182e7c8c
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
1af427a43d
futex.2: srcfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
47f5c4baf5
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
f529fd2013
futex Since Linux 2.6.22, EINTR can no longer occur on spurious wakeup
...
As reported by Rich Felker:
I see no code in the kernel whereby a "spurious wakeup",
or anything other than interruption by a signal handler
that's not SA_RESTART, can cause futex to fail with EINTR.
In general, overloading of EINTR and/or spurious EINTRs
from a syscall make it impossible to use that syscall for
implementing any function where EINTR is a mandatory
failure on interruption-by-signal, since there is no way
for userspace to distinguish whether the EINTR occurred
as a result of an interrupting signal or some other
reason. The kernel folks have gone to great lengths to fix
spurious EINTRs (see signal(7) for history), especially by
non-interrupting signal handlers, including in futex, and
allowing EINTR here would be contrary to that goal.
It's my belief that the "or a spurious wakeup" text should
simply be removed.
The reason I'm raising this topic is its relevance to a
thread on libc-alpha:
[RFC] mutex destruction (#13690 ): problem description and workarounds
The bug and mailing list discussions to which Rich refers are:
https://sourceware.org/bugzilla/show_bug.cgi?id=13690
https://sourceware.org/ml/libc-alpha/2014-12/threads.html#0001
Torvald Riegel also reported the same issue, and Thomas Gleixner
noted that the "EINTR on spurious wakeup" behavior went away in
Linux 2.6.22. See the LKML thread, "futex() man page update help
request", Jan 2015:
http://thread.gmane.org/gmane.linux.kernel/1703405/focus=7734
Reported-by: Rich Felker <dalias@libc.org>
Reported-by: Torvald Riegel <triegel@redhat.com>
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtknpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
9732dd8b3f
futex.2: Various fixes after review from Davidlohr Bueso
...
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
2abcba676a
futex.2: Remove FUTEX_REQUEUE EINVAL error case
...
Thomas Gleixner confirmed my reading that this case does
not apply.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
9e2b90ee42
futex.2: Add an attmpt at a defintion of PI-aware futexes
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
7bd3ffbc52
futex.2: srcfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:47 +01:00
Michael Kerrisk
d9d5be6bea
futex.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
809ca3ae64
futex.2: Note that the kernel only "knows" about a futex in the contended case
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
a663ca5a12
futex.2: Add some subsection headings
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
e219551457
futex.2: srcfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
ed44c7c071
futex.2: Rewrite text on intended users of futexes
...
Eliminate some redundant text.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
abb571e8b7
futex.2: Add text on pairing of FUTEX_WAIT_REQUEUE_PI + FUTEX_CMP_REQUEUE_PI
...
Reported-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
f1d2171d38
futex.2: srcfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
bdc5957afa
futex.2: Process/thread rewordings
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
a59564304a
futex.2: srcfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
6700de2462
futex.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
7d20efd7b0
futex.2: Add overview of priority inheritance
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
b565548bfa
futex.2: Add brief description of the priority inversion problem
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
dd003bef7a
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
8fe019c733
futex.2: SEE ALSO: add Documentation/robust-futex-ABI.txt
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
4cf9289452
futex.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
baf0f1f470
futex.2: Note that syscall() must be employed
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
4c2222812b
futex.2: SEEL ALSO: add author details + other minor tweaks
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
939ca89f38
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
d4ba43283d
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
a282e5b050
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
30ebf7b4a1
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
7f315ae3e5
futex.2: ffix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
43d16602be
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
64191e8f09
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
f2bf5121d5
futex.2: srcfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
53ba4030d1
futex.2: grfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:46 +01:00
Michael Kerrisk
4e566b1ebd
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
e45f973525
futex.2: Clarify that FUTEX_PRIVATE_FLAG relates to *thread* synchronization
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
f19904c01c
futex.2: wfix: mention "virtual" when talking about memory addreses
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
70b06b9033
futex.2: srcfix
...
Various minor fixes to source
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
a59fca7505
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
21b060bae6
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
5d67b190a1
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
f0c0d61cd8
futex.2: ERRORS: add EINVAL case for FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
99c0ac69d9
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
9786b3ca15
futex.2: ERRORS: Add EINVAL case for FUTEX_CMP_REQUEUE_PI
...
Reported-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
75299c8d17
futex.2: Fix EINVAL description for FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
6fbeb8f4a0
futex.2: Minor improvement to FUTEX_CMP_REQUEUE_PI text
...
Reported-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
55a8bca383
futex.2: srcfix: remove obsolete FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
1f043693de
futex.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
f48516d113
futex.2: ERRORS: added EAGAIN case for FUTEX_WAIT_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
63bea7dcbb
futex.2: Describe 'timeout' argument of FUTEX_WAIT_REQUEUE_PI
2015-12-15 14:39:45 +01:00
Michael Kerrisk
a4e6991290
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Thomas Gleixner
6ff1b4c013
futex.2: Document FUTEX_WAIT_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
c6d8cf213c
futex.2: srcfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
936876a994
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
de5a3bb47d
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
a696857697
futex.2: srcfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
768d3c2355
futex.2: Use 'val2' as the term for 'timeout' cast to 'u32'
...
This simplifies the text somewhat, so we don't need
to repeatedly describe how 'timeout' is cast 'u32'.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
99c0041df4
futex.2: ERRORS: add another EINVAL case (uaddr2) for FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
f9250b1a1a
futex.2: ERRORS: add EINVAL case for FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
025e137469
futex.2: ffix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:45 +01:00
Michael Kerrisk
476debd7ea
futex.2: ERRORS: place two similar EINVAL cases together
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
662c0da854
futex.2: ERRORS: add EDEADLK case for FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
dc2742a8aa
futex.2: ERRORS: add EPERM case for FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
04331c3fd8
futex.2: wfix for EPERM error
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
5eeca85632
futex.2: srcfix: add FIXME for "spurios wakeup" question from Rich Felker
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
2043f2c133
futex.2: ERRORS: added EINVAL case for FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
670b34f8e8
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
794bb106f4
futex.2: ERRORS: add ENOSYS case for FUTEX_WAIT_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
4945ff19bb
futex.2: ERRORS: add ENOSYS case for FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
a2ebebcdc7
futex.2: wfix for ENOSYS error
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
8f2068bbe4
futex.2: ERRORS: add EAGAIN case for FUTEX_CMP_REQUEUE_PI (uaddr futex != val3)
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
aaec90325b
futex.2: ERRORS: add EAGAIN case for FUTEX_CMP_REQUEUE_PI (uaddr2 owner exiting)
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
8727670917
futex.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
ce5602fde5
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
360f773c2b
futex.2: ERRORS: add ESRCH case for FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
2ed261994a
futex.2: SEE ALSO: add pointer to Hart LWN.net article
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
f6af90e736
futex.2: ffix (ASCII art layout)
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
c8b921bd42
futex.2: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
c84cf68c3b
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
be37667386
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
fc57e6bb5e
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
e34a8fb6c3
futex.2: ERRORS: Add ENOMEM case for FUTEX_CMP_REQUEUE_PI
...
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
9e54d26d3c
futex.2: Add further details for FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Darren Hart
f812a08b1d
futex.2: Describe FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
084744ef24
futex.2: Note arguments ignored by FUTEX_TRYLOCK_PI
...
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
11a194bff8
futex.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:44 +01:00
Michael Kerrisk
0b76182603
futex.2: srfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
c0091dd3ff
futex.2: srcfix: FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
badbf70cad
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>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
fa0388c309
futex.2: Rework FUTEXT_TRYLOCK_PI text a litte + add FIXMEs
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
67833bec78
futex.2: Rework FUTEX_LOCK_PI text and add FIXMEs
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
b52e1cd4a8
futex.2: Further tweaks to PI introductory text
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
f5ad572fcf
futex.2: ffix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
0483b6cce7
futex.2: Add more references to SEE ALSO
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
79d918c7af
futex.2: Rework Hart/Guniguntala text
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
7c16fbff95
futex.2: Integrate text from Darren Hart on PI Mutexes
...
From the 2009 Real-Time Linux Workshop paper
Requeue-PI: Making Glibc Condvars PI-Aware
Darren Hart, Dinakar Guniguntala
http://lwn.net/images/conf/rtlws11/papers/proc/p10.pdf
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
b4d4f5c537
futex.2: srcfix: Remove obsolete FIXME
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
bd90a5f9c3
futex.2: Add subsection for PI futexes
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
9ce19cf1b7
futex.2: Fix discussion of FUTEX_LOCK_PI 'timeout' argument
...
Reading futex_lock_pi(), it appears that the timeout is *not*
interpreted in the same way as for FUTEX_WAKE.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
a8b5b324e3
futex.2: RETURN VALUE: add FUTEX_WAKE_OP
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
22c15de938
futex.2: RETURN VALUE: add FUTEX_WAIT_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
dddd395a8d
futex.2: RETURN VALUE: add FUTEX_CMP_REQUEUE_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
52bb928f26
futex.2: RETURN VALUE: add FUTEX_UNLOCK_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
5c716eef68
futex.2: RETURN VALUE: add FUTEX_TRYLOCK_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
bf02a260f4
futex.2: RETURN VALUE: add FUTEX_LOCK_PI
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
b884566b97
futex.2: RETURN VALUE: add FUTEX_WAKE_BITSET
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
7bcc535166
futex.2: RETURN VALUE: add FUTEX_WAIT_BITSET
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
7446a8373c
futex.2: RETURN VALUE: mention FUTEX_WAKE_BITSET under FUTEX_WAIT
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
8f23887259
futex.2: Remove uneeded reference to ERRORS section
...
(The need to read ERRORS is implied.)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00
Michael Kerrisk
dcad19c0c1
futex.2: RETURN VALUE: add placeholder for various operations
...
There are still several operations whose return value
is not yet described.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-12-15 14:39:43 +01:00