Add feature test macro for atomic<T>::wait
authorThomas Rodgers <trodgers@redhat.com>
Tue, 1 Dec 2020 23:41:08 +0000 (15:41 -0800)
committerThomas Rodgers <trodgers@redhat.com>
Tue, 1 Dec 2020 23:43:17 +0000 (15:43 -0800)
commit6591e422692d80d066bacdcdafea2f864d8259c6
tree264e546f31035d1075cfbd6b673fdb6aa1e5c98c
parentabef36919f741c8e4f7380b2c2ffbc6ad97c2b6b
Add feature test macro for atomic<T>::wait

Adds __cpp_lib_atomic_wait feature test macro which was overlooked in
the initial commit of this feature. Replaces uses of
_GLIBCXX_HAVE_ATOMIC_WAIT.

libstdc++-v3/ChangeLog:

* include/bits/atomic_base.h: Replace usage of
_GLIBCXX_HAVE_ATOMIC_WAIT with __cpp_lib_atomic_wait.
* include/bits/atomic_timed_wait.h: Likewise.
* include/bits/atomic_wait.h: Define __cpp_lib_atomic_wait
feature test macro.
* include/bits/semaphore_base.h: Replace usage of
_GLIBCXX_HAVE_ATOMIC_WAIT with __cpp_lib_atomic_wait.
* include/std/atomic: Likewise.
* include/std/latch: Likewise.
* include/std/semaphore: Likewise.
* include/std/version: Define __cpp_lib_atomic wait
feature test macro and replace usage of
_GLIBCXX_HAVE_ATOMIC_WAIT.
* testsuite/29_atomics/atomic/wait_notify/1.cc: New test.
* testsuite/29_atomics/atomic/wait_notify/2.cc: Likewise.
libstdc++-v3/include/bits/atomic_base.h
libstdc++-v3/include/bits/atomic_timed_wait.h
libstdc++-v3/include/bits/atomic_wait.h
libstdc++-v3/include/bits/semaphore_base.h
libstdc++-v3/include/std/atomic
libstdc++-v3/include/std/latch
libstdc++-v3/include/std/semaphore
libstdc++-v3/include/std/version
libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/29_atomics/atomic/wait_notify/2.cc [new file with mode: 0644]