libstdc++: Fix testsuite helper functions [PR 97936]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 25 Nov 2020 14:39:54 +0000 (14:39 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 25 Nov 2020 18:24:12 +0000 (18:24 +0000)
commitf76cad692a62d44ed32d010200bad74f36c73092
treecf0518348b70483e8109c36632127e8a2c5d7edd
parentaec2d6849160f92cd45f97d6c3bdd8808ab01fa6
libstdc++: Fix testsuite helper functions [PR 97936]

This fixes a race condition in the util/atomic/wait_notify_util.h header
used by several tests, which should make the tests work properly.

libstdc++-v3/ChangeLog:

PR libstdc++/97936
* testsuite/29_atomics/atomic/wait_notify/bool.cc: Re-eneable
test.
* testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
* testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
* testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
* testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
* testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
* testsuite/util/atomic/wait_notify_util.h: Fix missed
notifications by making the new thread wait until the parent
thread is waiting on the condition variable.
libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/bool.cc
libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/generic.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_float/wait_notify.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/wait_notify.cc
libstdc++-v3/testsuite/util/atomic/wait_notify_util.h