summaryrefslogtreecommitdiff
path: root/sysdeps/nptl/lowlevellock.h
AgeCommit message (Collapse)Author
2016-01-04Update copyright dates with scripts/update-copyrights.Joseph Myers
2015-12-23Do not violate mutex destruction requirements.Torvald Riegel
POSIX and C++11 require that a thread can destroy a mutex if no other thread owns the mutex, is blocked on the mutex, or will try to acquire it in the future. After destroying the mutex, it can reuse or unmap the underlying memory. Thus, we must not access a mutex' memory after releasing it. Currently, we can load the private flag after releasing the mutex, which is fixed by this patch. See https://sourceware.org/bugzilla/show_bug.cgi?id=13690 for more background. We need to call futex_wake on the lock after releasing it, however. This is by design, and can lead to spurious wake-ups on unrelated futex words (e.g., when the mutex memory is reused for another mutex). This behavior is documented in the glibc-internal futex API and in recent drafts of the Linux kernel's futex documentation (see the draft_futex branch of git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git).
2015-01-02Update copyright dates with scripts/update-copyrights.Joseph Myers
2014-12-15Add comments for the generic lowlevellock implementation.Torvald Riegel
Patch by Bernard Ogden <bernie.ogden@linaro.org>.
2014-08-12Check value of futex before updating in __lll_timedlockBernard Ogden
2014-08-12 Bernard Ogden <bernie.ogden@linaro.org> [BZ #16892] * sysdeps/nptl/lowlevellock.h (__lll_timedlock): Use atomic_compare_and_exchange_bool_acq rather than atomic_exchange_acq.
2014-07-15Separate Linuxisms from lowlevellock.h, make a generic oneRoland McGrath
2014-07-07Remove old stub lowlevellock.h file. It is not even useful as documentation.Roland McGrath
2014-07-07Get rid of nptl/sysdeps/ entirely!Roland McGrath