diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-08-04 17:26:02 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-08-04 17:26:02 -0700 |
| commit | 54b67c20259f697f1e0c4532a5ee7e5d3f01eb1e (patch) | |
| tree | d91b41ddd5dd4b9b941691722ce6427b3b82fe59 /lib/libcxx/src/algorithm.cpp | |
| parent | 16513fee6c9c229e40f5abd82220a6f30e8e2180 (diff) | |
| download | zig-54b67c20259f697f1e0c4532a5ee7e5d3f01eb1e.tar.gz zig-54b67c20259f697f1e0c4532a5ee7e5d3f01eb1e.zip | |
libcxx: update from LLVM 10 to 11rc1
Diffstat (limited to 'lib/libcxx/src/algorithm.cpp')
| -rw-r--r-- | lib/libcxx/src/algorithm.cpp | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/lib/libcxx/src/algorithm.cpp b/lib/libcxx/src/algorithm.cpp index 40669fb9e7..9f11dc38b1 100644 --- a/lib/libcxx/src/algorithm.cpp +++ b/lib/libcxx/src/algorithm.cpp @@ -7,13 +7,6 @@ //===----------------------------------------------------------------------===// #include "algorithm" -#include "random" -#ifndef _LIBCPP_HAS_NO_THREADS -#include "mutex" -#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) -#pragma comment(lib, "pthread") -#endif -#endif _LIBCPP_BEGIN_NAMESPACE_STD @@ -51,45 +44,4 @@ template bool __insertion_sort_incomplete<__less<long double>&, long double*>(lo template unsigned __sort5<__less<long double>&, long double*>(long double*, long double*, long double*, long double*, long double*, __less<long double>&); -#ifndef _LIBCPP_HAS_NO_THREADS -_LIBCPP_SAFE_STATIC static __libcpp_mutex_t __rs_mut = _LIBCPP_MUTEX_INITIALIZER; -#endif -unsigned __rs_default::__c_ = 0; - -__rs_default::__rs_default() -{ -#ifndef _LIBCPP_HAS_NO_THREADS - __libcpp_mutex_lock(&__rs_mut); -#endif - __c_ = 1; -} - -__rs_default::__rs_default(const __rs_default&) -{ - ++__c_; -} - -__rs_default::~__rs_default() -{ -#ifndef _LIBCPP_HAS_NO_THREADS - if (--__c_ == 0) - __libcpp_mutex_unlock(&__rs_mut); -#else - --__c_; -#endif -} - -__rs_default::result_type -__rs_default::operator()() -{ - static mt19937 __rs_g; - return __rs_g(); -} - -__rs_default -__rs_get() -{ - return __rs_default(); -} - _LIBCPP_END_NAMESPACE_STD |
