mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-11-23 11:59:52 +00:00
Dimitry Andric: FreeBSD porting tweaks for PTHREAD_MUTEX_INITIALIZER and PTHREAD_COND_INITIALIZER
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@163626 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
460b4cadde
commit
5c90cbad38
@ -39,7 +39,7 @@ class _LIBCPP_VISIBLE mutex
|
|||||||
public:
|
public:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
||||||
constexpr mutex() _NOEXCEPT : __m_ PTHREAD_MUTEX_INITIALIZER {}
|
constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {}
|
||||||
#else
|
#else
|
||||||
mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;}
|
mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;}
|
||||||
#endif
|
#endif
|
||||||
@ -305,7 +305,7 @@ class _LIBCPP_VISIBLE condition_variable
|
|||||||
public:
|
public:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
||||||
constexpr condition_variable() : __cv_ PTHREAD_COND_INITIALIZER {}
|
constexpr condition_variable() : __cv_(PTHREAD_COND_INITIALIZER) {}
|
||||||
#else
|
#else
|
||||||
condition_variable() {__cv_ = (pthread_cond_t)PTHREAD_COND_INITIALIZER;}
|
condition_variable() {__cv_ = (pthread_cond_t)PTHREAD_COND_INITIALIZER;}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user