diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-06-01 17:27:48 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-06-01 17:38:31 +0000 |
commit | 8081702460726304af496be52234385094392a6f (patch) | |
tree | 55606e2a42e6342aaed360c27c17e9675c9c478e /nptl/Makefile | |
parent | a3e589d1f68d43d4c3f67d59497862875c2d5afc (diff) | |
download | glibc-8081702460726304af496be52234385094392a6f.tar.gz glibc-8081702460726304af496be52234385094392a6f.tar.xz glibc-8081702460726304af496be52234385094392a6f.zip |
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.
Diffstat (limited to 'nptl/Makefile')
-rw-r--r-- | nptl/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index a13b1c3308..ae4000205f 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -263,7 +263,7 @@ tests = tst-attr2 tst-attr3 tst-default-attr \ tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 \ tst-mutexpi5 tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a \ tst-mutexpi9 \ - tst-cond20 tst-cond21 tst-cond22 tst-cond26 \ + tst-cond22 tst-cond26 \ tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 tst-robustpi5 \ tst-robustpi6 tst-robustpi7 tst-robustpi9 \ tst-rwlock2 tst-rwlock2a tst-rwlock2b tst-rwlock3 \ |