xref: /freebsd/contrib/llvm-project/libcxx/include/__atomic/contention_t.h (revision cb14a3fe5122c879eae1fb480ed7ce82a699ddb6)
1*06c3fb27SDimitry Andric //===----------------------------------------------------------------------===//
2*06c3fb27SDimitry Andric //
3*06c3fb27SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*06c3fb27SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*06c3fb27SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*06c3fb27SDimitry Andric //
7*06c3fb27SDimitry Andric //===----------------------------------------------------------------------===//
8*06c3fb27SDimitry Andric 
9*06c3fb27SDimitry Andric #ifndef _LIBCPP___ATOMIC_CONTENTION_T_H
10*06c3fb27SDimitry Andric #define _LIBCPP___ATOMIC_CONTENTION_T_H
11*06c3fb27SDimitry Andric 
12*06c3fb27SDimitry Andric #include <__atomic/cxx_atomic_impl.h>
13*06c3fb27SDimitry Andric #include <__config>
14*06c3fb27SDimitry Andric #include <cstdint>
15*06c3fb27SDimitry Andric 
16*06c3fb27SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
17*06c3fb27SDimitry Andric #  pragma GCC system_header
18*06c3fb27SDimitry Andric #endif
19*06c3fb27SDimitry Andric 
20*06c3fb27SDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
21*06c3fb27SDimitry Andric 
22*06c3fb27SDimitry Andric #if defined(__linux__) || (defined(_AIX) && !defined(__64BIT__))
23*06c3fb27SDimitry Andric using __cxx_contention_t = int32_t;
24*06c3fb27SDimitry Andric #else
25*06c3fb27SDimitry Andric using __cxx_contention_t = int64_t;
26*06c3fb27SDimitry Andric #endif // __linux__ || (_AIX && !__64BIT__)
27*06c3fb27SDimitry Andric 
28*06c3fb27SDimitry Andric using __cxx_atomic_contention_t = __cxx_atomic_impl<__cxx_contention_t>;
29*06c3fb27SDimitry Andric 
30*06c3fb27SDimitry Andric _LIBCPP_END_NAMESPACE_STD
31*06c3fb27SDimitry Andric 
32*06c3fb27SDimitry Andric #endif // _LIBCPP___ATOMIC_CONTENTION_T_H
33