From c8f7413908ecdc12f8461181700a2d3d6a8c522f Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sat, 21 Jul 2012 16:32:53 +0000 Subject: [PATCH] noexcept applied to . git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160605 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/__mutex_base | 4 ++-- include/condition_variable | 16 ++++++++-------- src/condition_variable.cpp | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/__mutex_base b/include/__mutex_base index cd7346976..4fdcb617f 100644 --- a/include/__mutex_base +++ b/include/__mutex_base @@ -316,8 +316,8 @@ private: condition_variable& operator=(const condition_variable&); // = delete; public: - void notify_one(); - void notify_all(); + void notify_one() _NOEXCEPT; + void notify_all() _NOEXCEPT; void wait(unique_lock& __lk); template diff --git a/include/condition_variable b/include/condition_variable index b4da556f6..7d0b069a7 100644 --- a/include/condition_variable +++ b/include/condition_variable @@ -28,8 +28,8 @@ public: condition_variable(const condition_variable&) = delete; condition_variable& operator=(const condition_variable&) = delete; - void notify_one(); - void notify_all(); + void notify_one() noexcept; + void notify_all() noexcept; void wait(unique_lock& lock); template @@ -72,8 +72,8 @@ public: condition_variable_any(const condition_variable_any&) = delete; condition_variable_any& operator=(const condition_variable_any&) = delete; - void notify_one(); - void notify_all(); + void notify_one() noexcept; + void notify_all() noexcept; template void wait(Lock& lock); @@ -124,8 +124,8 @@ class _LIBCPP_VISIBLE condition_variable_any public: condition_variable_any(); - void notify_one(); - void notify_all(); + void notify_one() _NOEXCEPT; + void notify_all() _NOEXCEPT; template void wait(_Lock& __lock); @@ -161,7 +161,7 @@ condition_variable_any::condition_variable_any() inline _LIBCPP_INLINE_VISIBILITY void -condition_variable_any::notify_one() +condition_variable_any::notify_one() _NOEXCEPT { {lock_guard _(*__mut_);} __cv_.notify_one(); @@ -169,7 +169,7 @@ condition_variable_any::notify_one() inline _LIBCPP_INLINE_VISIBILITY void -condition_variable_any::notify_all() +condition_variable_any::notify_all() _NOEXCEPT { {lock_guard _(*__mut_);} __cv_.notify_all(); diff --git a/src/condition_variable.cpp b/src/condition_variable.cpp index b53b836bf..552bce356 100644 --- a/src/condition_variable.cpp +++ b/src/condition_variable.cpp @@ -20,13 +20,13 @@ condition_variable::~condition_variable() } void -condition_variable::notify_one() +condition_variable::notify_one() _NOEXCEPT { pthread_cond_signal(&__cv_); } void -condition_variable::notify_all() +condition_variable::notify_all() _NOEXCEPT { pthread_cond_broadcast(&__cv_); }