]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/libstdc++-v3/contrib/libstdc++-v3-4.7/include/std/mutex
update
[l4.git] / l4 / pkg / libstdc++-v3 / contrib / libstdc++-v3-4.7 / include / std / mutex
index a7ebace2c889c17218a90780a84629638c89f4b5..fc9691971c6093979a60664197e3c52b9ac8e1d0 100644 (file)
@@ -1,6 +1,6 @@
 // <mutex> -*- C++ -*-
 
-// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 #include <bits/gthr.h>
 #include <bits/move.h> // for std::swap
 
-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
 
 namespace std _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
+#ifdef _GLIBCXX_HAS_GTHREADS
   // Common base class for std::mutex and std::timed_mutex
   class __mutex_base
   {
@@ -116,13 +117,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
     // matches a recursive mutex with a member 'actual'
     template<typename _Rm>
-      static typename enable_if<sizeof(&_Rm::actual), void>::type
+      static typename enable_if<(bool)sizeof(&_Rm::actual), void>::type
       _S_destroy(_Rm* __mx)
       { __gthread_mutex_destroy(&__mx->actual); }
 
     // matches a gthr-win32.h recursive mutex
     template<typename _Rm>
-      static typename enable_if<sizeof(&_Rm::sema), void>::type
+      static typename enable_if<(bool)sizeof(&_Rm::sema), void>::type
       _S_destroy(_Rm* __mx)
       {
         __gthread_mutex_t __tmp;
@@ -420,6 +421,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       }
   };
 #endif
+#endif // _GLIBCXX_HAS_GTHREADS
 
   /// Do not acquire ownership of the mutex.
   struct defer_lock_t { };
@@ -755,6 +757,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
         }
     }
 
+#ifdef _GLIBCXX_HAS_GTHREADS
   /// once_flag
   struct once_flag
   {
@@ -826,12 +829,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       if (__e)
        __throw_system_error(__e);
     }
+#endif // _GLIBCXX_HAS_GTHREADS
 
   // @} group mutexes
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace
 
-#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
+#endif // _GLIBCXX_USE_C99_STDINT_TR1
 
 #endif // __GXX_EXPERIMENTAL_CXX0X__