aboutsummaryrefslogtreecommitdiff
path: root/lib/libcxx/src/mutex.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-10-02 10:45:56 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-10-02 10:45:56 -0700
commitdde0adcb363f3a3f306c0fc9eaec511cc3b74965 (patch)
tree9388d039a0b77211936c7264f5a3179f63ad51e6 /lib/libcxx/src/mutex.cpp
parentc4cd592f0e1eeff5a4056796610d97010ae4e38c (diff)
parent7a2624c3e40e2386a4a8a775b839e1d67608ec42 (diff)
downloadzig-dde0adcb363f3a3f306c0fc9eaec511cc3b74965.tar.gz
zig-dde0adcb363f3a3f306c0fc9eaec511cc3b74965.zip
Merge branch 'llvm13'
Diffstat (limited to 'lib/libcxx/src/mutex.cpp')
-rw-r--r--lib/libcxx/src/mutex.cpp24
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);