glibc/sysdeps/nptl
Torvald Riegel 389fdf78b2 Do not violate mutex destruction requirements.
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-12-23 18:44:53 +01:00
..
sys
aio_misc.h Add and use new glibc-internal futex API. 2015-07-10 13:47:09 +02:00
allocrtsig.c
fork.c Rename bits/stdio-lock.h to stdio-lock.h (bug 14912). 2015-09-04 16:21:14 +00:00
fork.h
futex-internal.h Add and use new glibc-internal futex API. 2015-07-10 13:47:09 +02:00
gai_misc.h Add and use new glibc-internal futex API. 2015-07-10 13:47:09 +02:00
Implies
internaltypes.h
jmp-unwind.c Use __libc_ptf_call in _longjmp_unwind 2015-09-18 12:22:47 -07:00
libc-lock.h Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912). 2015-09-08 21:11:03 +00:00
libc-lockP.h Replace MUTEX_INITIALIZER with _LIBC_LOCK_INITIALIZER in generic code 2015-11-24 16:37:15 +01:00
librt-cancellation.c
lowlevellock-futex.h
lowlevellock.h Do not violate mutex destruction requirements. 2015-12-23 18:44:53 +01:00
Makeconfig
Makefile Remove sysdeps/nptl/configure.ac. 2015-10-27 21:46:03 +00:00
malloc-machine.h Replace MUTEX_INITIALIZER with _LIBC_LOCK_INITIALIZER in generic code 2015-11-24 16:37:15 +01:00
nptl-signals.h
pthread-functions.h Use __pthread_setcancelstate in libc.a 2015-09-17 16:38:54 -07:00
pthread.h
setxid.h
shm-directory.h
sigfillset.c
stdio-lock.h Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912). 2015-09-08 21:11:03 +00:00
Subdirs
tcb-offsets.h
tst-mqueue8x.c
unwind-forcedunwind.c