aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2015-09-28 19:44:40 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2015-09-28 19:44:40 +0100
commit80400b0477598a858173d16c01abfd607a657722 (patch)
tree4f9f3894991a0125d737d2fc928d471ccfd55731
parent7009b073c56b40b280408c0ab69957651372c42e (diff)
downloadgcc-80400b0477598a858173d16c01abfd607a657722.zip
gcc-80400b0477598a858173d16c01abfd607a657722.tar.gz
gcc-80400b0477598a858173d16c01abfd607a657722.tar.bz2
LWG 2135: terminate() in condition_variable::wait()
* include/std/condition_variable (condition_variable::wait): Add noexcept. * src/c++11/condition_variable.cc (condition_variable::wait): Call std::terminate on error (DR 2135). From-SVN: r228217
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/std/condition_variable2
-rw-r--r--libstdc++-v3/src/c++11/condition_variable.cc4
3 files changed, 10 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 50f6e8b..6b2738f 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2015-09-28 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/std/condition_variable (condition_variable::wait): Add
+ noexcept.
+ * src/c++11/condition_variable.cc (condition_variable::wait): Call
+ std::terminate on error (DR 2135).
+
2015-09-25 Ville Voutilainen <ville.voutilainen@gmail.com>
Avoid creating dangling references in case of nested tuples
diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable
index 4714774..f5f7734 100644
--- a/libstdc++-v3/include/std/condition_variable
+++ b/libstdc++-v3/include/std/condition_variable
@@ -89,7 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
notify_all() noexcept;
void
- wait(unique_lock<mutex>& __lock);
+ wait(unique_lock<mutex>& __lock) noexcept;
template<typename _Predicate>
void
diff --git a/libstdc++-v3/src/c++11/condition_variable.cc b/libstdc++-v3/src/c++11/condition_variable.cc
index cc0f6e4..fd850cb 100644
--- a/libstdc++-v3/src/c++11/condition_variable.cc
+++ b/libstdc++-v3/src/c++11/condition_variable.cc
@@ -48,12 +48,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
void
- condition_variable::wait(unique_lock<mutex>& __lock)
+ condition_variable::wait(unique_lock<mutex>& __lock) noexcept
{
int __e = __gthread_cond_wait(&_M_cond, __lock.mutex()->native_handle());
if (__e)
- __throw_system_error(__e);
+ std::terminate();
}
void