libstdc++: make atomic waiting depend on gthreads or futexes
authorJonathan Wakely <jwakely@redhat.com>
Sun, 22 Nov 2020 01:00:46 +0000 (01:00 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 23 Nov 2020 18:12:39 +0000 (18:12 +0000)
commit183ae52b226898cc34aa51d4153cf0c006212a8a
treec2702c608997a70f46583569f878e08fc7d2a85a
parentbcbde431aa4366da18ac1687afb0bef6e4072d49
libstdc++: make atomic waiting depend on gthreads or futexes

libstdc++-v3/ChangeLog:

* include/bits/atomic_wait.h: Do not define anything unless
gthreads or futexes are available.
* include/bits/atomic_timed_wait.h: Likewise.
* include/bits/semaphore_base.h: Likewise.
* include/std/semaphore: Likewise.
* include/bits/atomic_base.h (atomic_flag::wait)
(atomic_flag::notify_one, atomic_flag::notify_all)
(__atomic_base<I>::wait, __atomic_base<I>::notify_one)
(__atomic_base<I>::notify_all, __atomic_base<P*>::wait)
(__atomic_base<P*>::notify_one, __atomic_base<P*>::notify_all)
(__atomic_impl::wait, __atomic_impl::notify_one)
(__atomic_impl::notify_all, __atomic_float::wait)
(__atomic_float::notify_one, __atomic_float::notify_all)
(__atomic_ref::wait, __atomic_ref::notify_one)
(__atomic_ref::notify_all): Only define if gthreads or futexes
are available.
* include/std/atomic (atomic::wait, atomic::notify_one)
(atomic::notify_all): Likewise.
* include/std/version (__cpp_lib_semaphore): Define
conditionally.
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/semaphore
libstdc++-v3/include/std/version