glibc/sysdeps/htl/bits
Samuel Thibault 8081702460 htl: Make pthread_cond_destroy wait for threads to be woken
This allows to reuse the storage after calling pthread_cond_destroy.

* sysdeps/htl/bits/types/struct___pthread_cond.h (__pthread_cond):
Replace unused struct __pthread_condimpl *__impl field with unsigned int
__wrefs.
(__PTHREAD_COND_INITIALIZER): Update accordingly.
* sysdeps/htl/pt-cond-timedwait.c (__pthread_cond_timedwait_internal):
Register as waiter in __wrefs field. On unregistering, wake any pending
pthread_cond_destroy.
* sysdeps/htl/pt-cond-destroy.c (__pthread_cond_destroy): Register wake
request in __wrefs.
* nptl/Makefile (tests): Move tst-cond20 tst-cond21 to...
* sysdeps/pthread/Makefile (tests): ... here.
* nptl/tst-cond20.c nptl/tst-cond21.c: Move to...
* sysdeps/pthread/tst-cond20.c sysdeps/pthread/tst-cond21.c: ... here.
2020-06-01 17:38:31 +00:00
..
types htl: Make pthread_cond_destroy wait for threads to be woken 2020-06-01 17:38:31 +00:00
cancelation.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pthread-np.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pthread.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pthreadtypes.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
semaphore.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
thread-shared-types.h htl: Add C11 threads types definitions 2020-02-09 13:56:48 +01:00