[cfe-commits] [libcxx] r162188 - in /libcxx/trunk: include/thread src/memory.cpp

Howard Hinnant hhinnant at apple.com
Sun Aug 19 08:13:17 PDT 2012


Author: hhinnant
Date: Sun Aug 19 10:13:16 2012
New Revision: 162188

URL: http://llvm.org/viewvc/llvm-project?rev=162188&view=rev
Log:
Patch contributed by Dev Dude for mingw64 port.

Modified:
    libcxx/trunk/include/thread
    libcxx/trunk/src/memory.cpp

Modified: libcxx/trunk/include/thread
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/thread?rev=162188&r1=162187&r2=162188&view=diff
==============================================================================
--- libcxx/trunk/include/thread (original)
+++ libcxx/trunk/include/thread Sun Aug 19 10:13:16 2012
@@ -227,7 +227,7 @@
     _LIBCPP_INLINE_VISIBILITY
     __thread_id(pthread_t __id) : __id_(__id) {}
 
-    friend __thread_id this_thread::get_id();
+    friend __thread_id this_thread::get_id() _NOEXCEPT;
     friend class _LIBCPP_VISIBLE thread;
     friend struct _LIBCPP_VISIBLE hash<__thread_id>;
 };

Modified: libcxx/trunk/src/memory.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/memory.cpp?rev=162188&r1=162187&r2=162188&view=diff
==============================================================================
--- libcxx/trunk/src/memory.cpp (original)
+++ libcxx/trunk/src/memory.cpp Sun Aug 19 10:13:16 2012
@@ -119,6 +119,8 @@
 
 #endif  // _LIBCPP_NO_RTTI
 
+#if __has_feature(cxx_atomic)
+
 static const std::size_t __sp_mut_count = 16;
 static mutex mut_back[__sp_mut_count];
 
@@ -162,6 +164,7 @@
     return muts[hash<const void*>()(p) & (__sp_mut_count-1)];
 }
 
+#endif // __has_feature(cxx_atomic)
 
 void
 declare_reachable(void*)





More information about the cfe-commits mailing list