diff options
Diffstat (limited to 'lib/libcxx/src/mutex.cpp')
| -rw-r--r-- | lib/libcxx/src/mutex.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libcxx/src/mutex.cpp b/lib/libcxx/src/mutex.cpp index 27a4fd8927..36362e34f3 100644 --- a/lib/libcxx/src/mutex.cpp +++ b/lib/libcxx/src/mutex.cpp @@ -36,13 +36,13 @@ mutex::lock() } bool -mutex::try_lock() _NOEXCEPT +mutex::try_lock() noexcept { return __libcpp_mutex_trylock(&__m_); } void -mutex::unlock() _NOEXCEPT +mutex::unlock() noexcept { int ec = __libcpp_mutex_unlock(&__m_); (void)ec; @@ -74,7 +74,7 @@ recursive_mutex::lock() } void -recursive_mutex::unlock() _NOEXCEPT +recursive_mutex::unlock() noexcept { int e = __libcpp_recursive_mutex_unlock(&__m_); (void)e; @@ -82,7 +82,7 @@ recursive_mutex::unlock() _NOEXCEPT } bool -recursive_mutex::try_lock() _NOEXCEPT +recursive_mutex::try_lock() noexcept { return __libcpp_recursive_mutex_trylock(&__m_); } @@ -109,7 +109,7 @@ timed_mutex::lock() } bool -timed_mutex::try_lock() _NOEXCEPT +timed_mutex::try_lock() noexcept { unique_lock<mutex> lk(__m_, try_to_lock); if (lk.owns_lock() && !__locked_) @@ -121,7 +121,7 @@ timed_mutex::try_lock() _NOEXCEPT } void -timed_mutex::unlock() _NOEXCEPT +timed_mutex::unlock() noexcept { lock_guard<mutex> _(__m_); __locked_ = false; @@ -160,7 +160,7 @@ recursive_timed_mutex::lock() } bool -recursive_timed_mutex::try_lock() _NOEXCEPT +recursive_timed_mutex::try_lock() noexcept { __thread_id id = this_thread::get_id(); unique_lock<mutex> lk(__m_, try_to_lock); @@ -176,7 +176,7 @@ recursive_timed_mutex::try_lock() _NOEXCEPT } void -recursive_timed_mutex::unlock() _NOEXCEPT +recursive_timed_mutex::unlock() noexcept { unique_lock<mutex> lk(__m_); if (--__count_ == 0) @@ -209,7 +209,7 @@ void __call_once(volatile once_flag::_State_type& flag, void* arg, #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif // _LIBCPP_NO_EXCEPTIONS +#endif // _LIBCPP_NO_EXCEPTIONS flag = 1; func(arg); flag = ~once_flag::_State_type(0); @@ -220,7 +220,7 @@ void __call_once(volatile once_flag::_State_type& flag, void* arg, flag = 0; throw; } -#endif // _LIBCPP_NO_EXCEPTIONS +#endif // _LIBCPP_NO_EXCEPTIONS } #else // !_LIBCPP_HAS_NO_THREADS __libcpp_mutex_lock(&mut); @@ -231,7 +231,7 @@ void __call_once(volatile once_flag::_State_type& flag, void* arg, #ifndef _LIBCPP_NO_EXCEPTIONS try { -#endif // _LIBCPP_NO_EXCEPTIONS +#endif // _LIBCPP_NO_EXCEPTIONS __libcpp_relaxed_store(&flag, once_flag::_State_type(1)); __libcpp_mutex_unlock(&mut); func(arg); @@ -250,7 +250,7 @@ void __call_once(volatile once_flag::_State_type& flag, void* arg, __libcpp_condvar_broadcast(&cv); throw; } -#endif // _LIBCPP_NO_EXCEPTIONS +#endif // _LIBCPP_NO_EXCEPTIONS } else __libcpp_mutex_unlock(&mut); |
