This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


One more patch to fix the preprocessor conditions, this time to fix
--disable-threads builds.

Tested x86_64-linux, committed to trunk.
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]