re PR target/64368 (Several libstdc++ test failures on non-linux platforms after...
authorJonathan Wakely <jwakely@redhat.com>
Tue, 27 Jan 2015 11:12:04 +0000 (11:12 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 27 Jan 2015 11:12:04 +0000 (11:12 +0000)
PR libstdc++/64368
* include/std/shared_mutex (shared_timed_mutex::try_lock_for,
shared_timed_mutex::try_lock_until): Only define when POSIX thread
timeouts option is supported.
(shared_timed_mutex::try_shared_lock_for,
shared_timed_mutex::try_shared_lock_until): Likewise.

From-SVN: r220161

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/shared_mutex

index 4cdcd148abd66cfba732fd85515f42bd2c60fcbc..169f02e0312a47c7907a3a02b30367cae0ff8117 100644 (file)
@@ -1,3 +1,12 @@
+2015-01-27  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/64368
+       * include/std/shared_mutex (shared_timed_mutex::try_lock_for,
+       shared_timed_mutex::try_lock_until): Only define when POSIX thread
+       timeouts option is supported.
+       (shared_timed_mutex::try_shared_lock_for,
+       shared_timed_mutex::try_shared_lock_until): Likewise.
+
 2015-01-26  Jonathan Wakely  <jwakely@redhat.com>
 
        PR libstdc++/64368
index 643768c6f8b27d57abac60127fcc2acc6d56ffa6..47cfc6433d96f4268c53fc83a8e46b76f62bd9d2 100644 (file)
@@ -108,6 +108,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       return true;
     }
 
+#if _GTHREAD_USE_MUTEX_TIMEDLOCK
     template<typename _Rep, typename _Period>
       bool
       try_lock_for(const chrono::duration<_Rep, _Period>& __rel_time)
@@ -149,6 +150,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        const auto __s_atime = __s_entry + __delta;
        return try_lock_until(__s_atime);
       }
+#endif
 
     void
     unlock()
@@ -186,6 +188,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       return true;
     }
 
+#if _GTHREAD_USE_MUTEX_TIMEDLOCK
     template<typename _Rep, typename _Period>
       bool
       try_lock_shared_for(const chrono::duration<_Rep, _Period>& __rel_time)
@@ -230,6 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        const auto __s_atime = __s_entry + __delta;
        return try_lock_shared_until(__s_atime);
       }
+#endif
 
     void
     unlock_shared()