diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-08-30 18:27:31 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-08-30 18:27:31 +0000 |
| commit | 7c82a1ece4c97ca136a699a03aa193cca88f0a1e (patch) | |
| tree | 052e69c58e6e832f3aa79ea12ac2b727877aa2fc /contrib/libc++/src/condition_variable.cpp | |
| parent | cc5e1c7d548784d1c8ce01591920b7283be48dd3 (diff) | |
| parent | e947f967d1e30b3973f8a789e682da57481a5ece (diff) | |
Notes
Diffstat (limited to 'contrib/libc++/src/condition_variable.cpp')
| -rw-r--r-- | contrib/libc++/src/condition_variable.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/libc++/src/condition_variable.cpp b/contrib/libc++/src/condition_variable.cpp index 5fd5fc891c16..bfb4bf3925f7 100644 --- a/contrib/libc++/src/condition_variable.cpp +++ b/contrib/libc++/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"); } |
