[PATCH 1/2] Add futex wrappers with error checking
Torvald Riegel
triegel@redhat.com
Thu Dec 4 20:54:00 GMT 2014
This adds new functions for futex operations, starting with wait,
timedwait, wake. They add documentation and error checking according to
the outcomes of this thread:
https://sourceware.org/ml/libc-alpha/2014-09/msg00381.html
My intent is to move over other futex callers incrementally, over time.
Right now, this is not intended to replace the futex operations aimed at
lowlevellocks, but just those in other places that uses the lll_futex_*
functions now.
It is implemented on top of lll_futex_*, so that we can expose the raw
futex to users via a syscall wrapper (or external futex_wait,...
functions), should we want to do that in the future.
We can add other futex operations as necessary, and when there is a need
(e.g., PI cmp requeue).
They have been tested on x86 and x86_64 with pthread_once (patch 2/2)
and the new semaphore implementation I'm about to post.
2014-12-05 Torvald Riegel <triegel@redhat.com>
* nptl/futex-internal.h: New file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: futex-internal.patch
Type: text/x-patch
Size: 8401 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20141204/ea9cc0ad/attachment.bin>
More information about the Libc-alpha
mailing list