diff mbox

[libstdc++] Optimize synchronization in std::future if futexes are available.

Message ID 20150201151337.GN3360@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely Feb. 1, 2015, 3:13 p.m. UTC
One more patch to fix the preprocessor conditions, this time to fix
--disable-threads builds.

Tested x86_64-linux, committed to trunk.
diff mbox

Patch

commit 911783907e5482c09d80fd8a5e3b5aa6d2b891d3
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Sat Jan 31 22:01:43 2015 +0000

    	* src/c++11/futex.cc: Do not define for gthr-single.h targets.

diff --git a/libstdc++-v3/src/c++11/futex.cc b/libstdc++-v3/src/c++11/futex.cc
index 1336779..a7f0200 100644
--- a/libstdc++-v3/src/c++11/futex.cc
+++ b/libstdc++-v3/src/c++11/futex.cc
@@ -23,6 +23,7 @@ 
 // <http://www.gnu.org/licenses/>.
 
 #include <bits/atomic_futex.h>
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
 #if defined(_GLIBCXX_HAVE_LINUX_FUTEX) && ATOMIC_INT_LOCK_FREE > 1
 #include <chrono>
 #include <climits>
@@ -94,3 +95,4 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 }
 #endif
+#endif