diff options
Diffstat (limited to 'src/condition_variable.cpp')
-rw-r--r-- | src/condition_variable.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/condition_variable.cpp b/src/condition_variable.cpp index 5fd5fc891c16..bfb4bf3925f7 100644 --- a/src/condition_variable.cpp +++ b/src/condition_variable.cpp @@ -20,19 +20,19 @@ _LIBCPP_BEGIN_NAMESPACE_STD condition_variable::~condition_variable() { - pthread_cond_destroy(&__cv_); + __libcpp_condvar_destroy(&__cv_); } void condition_variable::notify_one() _NOEXCEPT { - pthread_cond_signal(&__cv_); + __libcpp_condvar_signal(&__cv_); } void condition_variable::notify_all() _NOEXCEPT { - pthread_cond_broadcast(&__cv_); + __libcpp_condvar_broadcast(&__cv_); } void @@ -41,7 +41,7 @@ condition_variable::wait(unique_lock<mutex>& lk) _NOEXCEPT if (!lk.owns_lock()) __throw_system_error(EPERM, "condition_variable::wait: mutex not locked"); - int ec = pthread_cond_wait(&__cv_, lk.mutex()->native_handle()); + int ec = __libcpp_condvar_wait(&__cv_, lk.mutex()->native_handle()); if (ec) __throw_system_error(ec, "condition_variable wait failed"); } @@ -71,7 +71,7 @@ condition_variable::__do_timed_wait(unique_lock<mutex>& lk, ts.tv_sec = ts_sec_max; ts.tv_nsec = giga::num - 1; } - int ec = pthread_cond_timedwait(&__cv_, lk.mutex()->native_handle(), &ts); + int ec = __libcpp_condvar_timedwait(&__cv_, lk.mutex()->native_handle(), &ts); if (ec != 0 && ec != ETIMEDOUT) __throw_system_error(ec, "condition_variable timed_wait failed"); } |