diff options
Diffstat (limited to 'libcxx/src/memory.cpp')
-rw-r--r-- | libcxx/src/memory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/src/memory.cpp b/libcxx/src/memory.cpp index 7a1c283..16190c2 100644 --- a/libcxx/src/memory.cpp +++ b/libcxx/src/memory.cpp @@ -13,7 +13,7 @@ #include <memory> -#ifndef _LIBCPP_HAS_NO_THREADS +#if _LIBCPP_HAS_THREADS # include <mutex> # include <thread> # if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) @@ -96,7 +96,7 @@ __shared_weak_count* __shared_weak_count::lock() noexcept { const void* __shared_weak_count::__get_deleter(const type_info&) const noexcept { return nullptr; } -#if !defined(_LIBCPP_HAS_NO_THREADS) +#if _LIBCPP_HAS_THREADS static constexpr std::size_t __sp_mut_count = 32; static constinit __libcpp_mutex_t mut_back[__sp_mut_count] = { @@ -128,7 +128,7 @@ __sp_mut& __get_sp_mut(const void* p) { return muts[hash<const void*>()(p) & (__sp_mut_count - 1)]; } -#endif // !defined(_LIBCPP_HAS_NO_THREADS) +#endif // _LIBCPP_HAS_THREADS void* align(size_t alignment, size_t size, void*& ptr, size_t& space) { void* r = nullptr; |