public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-9834] libstdc++: Disable atomic wait for freestanding [PR105021]
@ 2022-04-12 20:18 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2022-04-12 20:18 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:ac0e9b696c362fdd49752260ca7b3ce9e467ec36

commit r11-9834-gac0e9b696c362fdd49752260ca7b3ce9e467ec36
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Mar 22 21:17:01 2022 +0000

    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.
    
    (cherry picked from commit 5bf59b004808abf6acbfe5ef54a0f9216b8dce22)

Diff:
---
 libstdc++-v3/include/bits/atomic_base.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h
index 2db35722ce0..60b976bf8d1 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-12 20:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12 20:18 [gcc r11-9834] libstdc++: Disable atomic wait for freestanding [PR105021] Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).