diff options
author | halyavin <halyavin@yandex-team.com> | 2022-07-21 11:17:19 +0300 |
---|---|---|
committer | halyavin <halyavin@yandex-team.com> | 2022-07-21 11:17:19 +0300 |
commit | b78ae8ac7797d88986dfa1526ea11fcbdb4f5f6f (patch) | |
tree | f4368f9265036a664df40ae4943cabd4f272d414 /contrib/libs/cxxsupp/libcxx/src/mutex.cpp | |
parent | b651f08845dea01bbd05b6b7d56aba3992374706 (diff) | |
download | ydb-b78ae8ac7797d88986dfa1526ea11fcbdb4f5f6f.tar.gz |
Update libc++ to 34313583 (20 Feb 2022).
Notable changes:
* replace _LIBCPP_INLINE_VISIBILITY with _LIBCPP_HIDE_FROM_ABI in __filesystem/operations.h
* implement sortable and mergeable concepts
* replace __uncvref with __uncvref_t
* implement consistent stateful allocator behavior in std::basic_string::operator+
* remove some _LIBCPP_CXX03_LANG ifdef's
* move _LIBCPP_ASSERT related code to a separate file
* enable std::hash<Enum> in C++11 mode
* make algorithm includes more granular
* implement range functionality for std::istream_iterator
* add debug check in basic_string::insert
* replace "" with <> in includes in src/ files for consistency with include/
* add push/pop macros defines in src/ files for consistency with include/
* add availability annotations to optional operations
* remove conditional noexcept from view_interface --- this is allowed by the standard
* replace _LIBCPP_SAFE_STATIC with _LIBCPP_CONSTINIT
* guard most of std::ranges under _LIBCPP_HAS_NO_INCOMPLETE_RANGES
* remove priority pragma for AIX from locale.cpp because it is ignored anyway
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/src/mutex.cpp')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/src/mutex.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/src/mutex.cpp b/contrib/libs/cxxsupp/libcxx/src/mutex.cpp index b9028e64bb..c247225e31 100644 --- a/contrib/libs/cxxsupp/libcxx/src/mutex.cpp +++ b/contrib/libs/cxxsupp/libcxx/src/mutex.cpp @@ -6,21 +6,26 @@ // //===----------------------------------------------------------------------===// -#include "mutex" -#include "limits" -#include "system_error" +#include <__assert> +#include <limits> +#include <mutex> +#include <system_error> + #if !defined(_LIBCPP_ABI_MICROSOFT) #include "include/atomic_support.h" #endif -#include "__undef_macros" #ifndef _LIBCPP_HAS_NO_THREADS -#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) -#pragma comment(lib, "pthread") -#endif +# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) +# pragma comment(lib, "pthread") +# endif #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD + #ifndef _LIBCPP_HAS_NO_THREADS const defer_lock_t defer_lock{}; @@ -198,8 +203,8 @@ recursive_timed_mutex::unlock() noexcept // keep in sync with: 7741191. #ifndef _LIBCPP_HAS_NO_THREADS -_LIBCPP_SAFE_STATIC static __libcpp_mutex_t mut = _LIBCPP_MUTEX_INITIALIZER; -_LIBCPP_SAFE_STATIC static __libcpp_condvar_t cv = _LIBCPP_CONDVAR_INITIALIZER; +static _LIBCPP_CONSTINIT __libcpp_mutex_t mut = _LIBCPP_MUTEX_INITIALIZER; +static _LIBCPP_CONSTINIT __libcpp_condvar_t cv = _LIBCPP_CONDVAR_INITIALIZER; #endif #ifdef _LIBCPP_ABI_MICROSOFT @@ -277,3 +282,5 @@ void __call_once(volatile once_flag::_State_type& flag, void* arg, } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS |