| //===----------------------------------------------------------------------===// |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| //===----------------------------------------------------------------------===// |
| # if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) |
| # pragma comment(lib, "pthread") |
| _LIBCPP_BEGIN_NAMESPACE_STD |
| static constinit __libcpp_mutex_t __rs_mut = _LIBCPP_MUTEX_INITIALIZER; |
| unsigned __rs_default::__c_ = 0; |
| __rs_default::__rs_default() { |
| __libcpp_mutex_lock(&__rs_mut); |
| __rs_default::__rs_default(const __rs_default&) { ++__c_; } |
| __rs_default::~__rs_default() { |
| __libcpp_mutex_unlock(&__rs_mut); |
| __rs_default::result_type __rs_default::operator()() { |
| __rs_default __rs_get() { return __rs_default(); } |
| _LIBCPP_END_NAMESPACE_STD |