https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111588

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
If we do want to do it, I think we'd just need something like this (and docs):

--- a/libstdc++-v3/include/ext/atomicity.h
+++ b/libstdc++-v3/include/ext/atomicity.h
@@ -48,6 +48,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
 #ifndef __GTHREADS
     return true;
+#elif defined(_GLIBCXX_ASSUME_NEVER_SINGLE_THREADED)
+    return false;
 #elif __has_include(<sys/single_threaded.h>)
     return ::__libc_single_threaded;
 #else

Reply via email to