aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-03-22 21:17:01 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-03-23 10:03:03 +0000
commit5bf59b004808abf6acbfe5ef54a0f9216b8dce22 (patch)
tree8fb3ed4e3855945db9d3f5aa4cc2f1de81b902ad /libstdc++-v3
parent4a9e92164a547afcf8cd3fc593c7660238ad2d59 (diff)
downloadgcc-5bf59b004808abf6acbfe5ef54a0f9216b8dce22.zip
gcc-5bf59b004808abf6acbfe5ef54a0f9216b8dce22.tar.gz
gcc-5bf59b004808abf6acbfe5ef54a0f9216b8dce22.tar.bz2
libstdc++: Disable atomic wait for freestanding [PR105021]
We use either condition variables or futexes to implement atomic waits, so we can't do it in freestanding. This is non-conforming, so should be revisited later, probably by making freestanding atomic waiting operations spin without ever blocking. Reviewed-by: Thomas Rodgers <trodgers@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/105021 * include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include <bits/atomic_wait.h> for freestanding.
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/include/bits/atomic_base.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h
index d86766cf..2cad848 100644
--- a/libstdc++-v3/include/bits/atomic_base.h
+++ b/libstdc++-v3/include/bits/atomic_base.h
@@ -37,7 +37,7 @@
#include <bits/atomic_lockfree_defines.h>
#include <bits/move.h>
-#if __cplusplus > 201703L
+#if __cplusplus > 201703L && _GLIBCXX_HOSTED
#include <bits/atomic_wait.h>
#endif