[cfe-commits] [libcxx] r160605 - in /libcxx/trunk: include/__mutex_base include/condition_variable src/condition_variable.cpp
Howard Hinnant
hhinnant at apple.com
Sat Jul 21 09:32:53 PDT 2012
Author: hhinnant
Date: Sat Jul 21 11:32:53 2012
New Revision: 160605
URL: http://llvm.org/viewvc/llvm-project?rev=160605&view=rev
Log:
noexcept applied to <condition_variable>.
Modified:
libcxx/trunk/include/__mutex_base
libcxx/trunk/include/condition_variable
libcxx/trunk/src/condition_variable.cpp
Modified: libcxx/trunk/include/__mutex_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__mutex_base?rev=160605&r1=160604&r2=160605&view=diff
==============================================================================
--- libcxx/trunk/include/__mutex_base (original)
+++ libcxx/trunk/include/__mutex_base Sat Jul 21 11:32:53 2012
@@ -316,8 +316,8 @@
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<mutex>& __lk);
template <class _Predicate>
Modified: libcxx/trunk/include/condition_variable
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/condition_variable?rev=160605&r1=160604&r2=160605&view=diff
==============================================================================
--- libcxx/trunk/include/condition_variable (original)
+++ libcxx/trunk/include/condition_variable Sat Jul 21 11:32:53 2012
@@ -28,8 +28,8 @@
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<mutex>& lock);
template <class Predicate>
@@ -72,8 +72,8 @@
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 <class Lock>
void wait(Lock& lock);
@@ -124,8 +124,8 @@
public:
condition_variable_any();
- void notify_one();
- void notify_all();
+ void notify_one() _NOEXCEPT;
+ void notify_all() _NOEXCEPT;
template <class _Lock>
void wait(_Lock& __lock);
@@ -161,7 +161,7 @@
inline _LIBCPP_INLINE_VISIBILITY
void
-condition_variable_any::notify_one()
+condition_variable_any::notify_one() _NOEXCEPT
{
{lock_guard<mutex> _(*__mut_);}
__cv_.notify_one();
@@ -169,7 +169,7 @@
inline _LIBCPP_INLINE_VISIBILITY
void
-condition_variable_any::notify_all()
+condition_variable_any::notify_all() _NOEXCEPT
{
{lock_guard<mutex> _(*__mut_);}
__cv_.notify_all();
Modified: libcxx/trunk/src/condition_variable.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/condition_variable.cpp?rev=160605&r1=160604&r2=160605&view=diff
==============================================================================
--- libcxx/trunk/src/condition_variable.cpp (original)
+++ libcxx/trunk/src/condition_variable.cpp Sat Jul 21 11:32:53 2012
@@ -20,13 +20,13 @@
}
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_);
}
More information about the cfe-commits
mailing list