Commit 506f03c3 by Jonathan Wakely Committed by Jonathan Wakely

re PR target/64368 (Several libstdc++ test failures on non-linux platforms after r218964.)

	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
parent f962fbf1
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> 2015-01-26 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/64368 PR libstdc++/64368
......
...@@ -108,6 +108,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -108,6 +108,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return true; return true;
} }
#if _GTHREAD_USE_MUTEX_TIMEDLOCK
template<typename _Rep, typename _Period> template<typename _Rep, typename _Period>
bool bool
try_lock_for(const chrono::duration<_Rep, _Period>& __rel_time) try_lock_for(const chrono::duration<_Rep, _Period>& __rel_time)
...@@ -149,6 +150,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -149,6 +150,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const auto __s_atime = __s_entry + __delta; const auto __s_atime = __s_entry + __delta;
return try_lock_until(__s_atime); return try_lock_until(__s_atime);
} }
#endif
void void
unlock() unlock()
...@@ -186,6 +188,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -186,6 +188,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return true; return true;
} }
#if _GTHREAD_USE_MUTEX_TIMEDLOCK
template<typename _Rep, typename _Period> template<typename _Rep, typename _Period>
bool bool
try_lock_shared_for(const chrono::duration<_Rep, _Period>& __rel_time) try_lock_shared_for(const chrono::duration<_Rep, _Period>& __rel_time)
...@@ -230,6 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -230,6 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const auto __s_atime = __s_entry + __delta; const auto __s_atime = __s_entry + __delta;
return try_lock_shared_until(__s_atime); return try_lock_shared_until(__s_atime);
} }
#endif
void void
unlock_shared() unlock_shared()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment