libstdc++: Fix some more deadlocks in tests [PR 97936]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 26 Nov 2020 12:55:47 +0000 (12:55 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 26 Nov 2020 16:15:52 +0000 (16:15 +0000)
commit10522ed1089277e2aa6cd708205aa5c730179cf0
tree53128151673d121ef05989f22da826b591223b76
parent10ee46adf44ae731fc4f9e9fdc25ad60c9d43a9c
libstdc++: Fix some more deadlocks in tests [PR 97936]

The missed notifications fixed in r11-5383 also happen in some other
tests which have similar code.

libstdc++-v3/ChangeLog:

PR libstdc++/97936
* testsuite/29_atomics/atomic/wait_notify/bool.cc: Fix missed
notifications by making the new thread wait until the parent
thread is waiting on the condition variable.
* testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
* testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
* testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/bool.cc
libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/pointers.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/wait_notify/1.cc
libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc