summaryrefslogtreecommitdiffstats
path: root/libcxx/src
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2014-03-26 02:45:04 +0000
committerMarshall Clow <mclow.lists@gmail.com>2014-03-26 02:45:04 +0000
commit1641a7c1cb198cb5bb4b96d0890d1e7d13e089c4 (patch)
treec0b96a2cc3983afefb7ab9d2c28b775c85f42a27 /libcxx/src
parent28c391f68e95408ef263bad494addc5e77975e50 (diff)
downloadbcm5719-llvm-1641a7c1cb198cb5bb4b96d0890d1e7d13e089c4.tar.gz
bcm5719-llvm-1641a7c1cb198cb5bb4b96d0890d1e7d13e089c4.zip
Implement LWG issue #2135. If something goes wrong in condition_variable::wait, call terminate() rather than throwing an error. Do this indirectly, by marking the call as 'noexcept'. This is better than just calling terminate() directly, because it gives a better error message on the console.
llvm-svn: 204778
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/condition_variable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/src/condition_variable.cpp b/libcxx/src/condition_variable.cpp
index de0f6f47dd1..061d1388d3e 100644
--- a/libcxx/src/condition_variable.cpp
+++ b/libcxx/src/condition_variable.cpp
@@ -32,7 +32,7 @@ condition_variable::notify_all() _NOEXCEPT
}
void
-condition_variable::wait(unique_lock<mutex>& lk)
+condition_variable::wait(unique_lock<mutex>& lk) _NOEXCEPT
{
if (!lk.owns_lock())
__throw_system_error(EPERM,
@@ -44,7 +44,7 @@ condition_variable::wait(unique_lock<mutex>& lk)
void
condition_variable::__do_timed_wait(unique_lock<mutex>& lk,
- chrono::time_point<chrono::system_clock, chrono::nanoseconds> tp)
+ chrono::time_point<chrono::system_clock, chrono::nanoseconds> tp) _NOEXCEPT
{
using namespace chrono;
if (!lk.owns_lock())
OpenPOWER on IntegriCloud