summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-27 11:12:04 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-27 11:12:04 +0000
commit2a2923e12c926014a5b80a2c92e79106f3049e4f (patch)
tree7d15096d2ba2e08e32e469edabcaeb051a72699e /libstdc++-v3
parent43cbcd84e22762b7fed7bc6f6749fe669c55fe1b (diff)
downloadgcc-2a2923e12c926014a5b80a2c92e79106f3049e4f.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220161 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/include/std/shared_mutex4
2 files changed, 13 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 4cdcd148abd..169f02e0312 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/include/std/shared_mutex b/libstdc++-v3/include/std/shared_mutex
index 643768c6f8b..47cfc6433d9 100644
--- a/libstdc++-v3/include/std/shared_mutex
+++ b/libstdc++-v3/include/std/shared_mutex
@@ -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()