xref: /freebsd/contrib/llvm-project/libcxx/include/__atomic/atomic_lock_free.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_ATOMIC_LOCK_FREE_H
10*06c3fb27SDimitry Andric #define _LIBCPP___ATOMIC_ATOMIC_LOCK_FREE_H
11*06c3fb27SDimitry Andric 
12*06c3fb27SDimitry Andric #include <__config>
13*06c3fb27SDimitry Andric 
14*06c3fb27SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
15*06c3fb27SDimitry Andric #  pragma GCC system_header
16*06c3fb27SDimitry Andric #endif
17*06c3fb27SDimitry Andric 
18*06c3fb27SDimitry Andric #if defined(__CLANG_ATOMIC_BOOL_LOCK_FREE)
19*06c3fb27SDimitry Andric #  define ATOMIC_BOOL_LOCK_FREE __CLANG_ATOMIC_BOOL_LOCK_FREE
20*06c3fb27SDimitry Andric #  define ATOMIC_CHAR_LOCK_FREE __CLANG_ATOMIC_CHAR_LOCK_FREE
21*06c3fb27SDimitry Andric #  ifndef _LIBCPP_HAS_NO_CHAR8_T
22*06c3fb27SDimitry Andric #    define ATOMIC_CHAR8_T_LOCK_FREE __CLANG_ATOMIC_CHAR8_T_LOCK_FREE
23*06c3fb27SDimitry Andric #  endif
24*06c3fb27SDimitry Andric #  define ATOMIC_CHAR16_T_LOCK_FREE __CLANG_ATOMIC_CHAR16_T_LOCK_FREE
25*06c3fb27SDimitry Andric #  define ATOMIC_CHAR32_T_LOCK_FREE __CLANG_ATOMIC_CHAR32_T_LOCK_FREE
26*06c3fb27SDimitry Andric #  define ATOMIC_WCHAR_T_LOCK_FREE __CLANG_ATOMIC_WCHAR_T_LOCK_FREE
27*06c3fb27SDimitry Andric #  define ATOMIC_SHORT_LOCK_FREE __CLANG_ATOMIC_SHORT_LOCK_FREE
28*06c3fb27SDimitry Andric #  define ATOMIC_INT_LOCK_FREE __CLANG_ATOMIC_INT_LOCK_FREE
29*06c3fb27SDimitry Andric #  define ATOMIC_LONG_LOCK_FREE __CLANG_ATOMIC_LONG_LOCK_FREE
30*06c3fb27SDimitry Andric #  define ATOMIC_LLONG_LOCK_FREE __CLANG_ATOMIC_LLONG_LOCK_FREE
31*06c3fb27SDimitry Andric #  define ATOMIC_POINTER_LOCK_FREE __CLANG_ATOMIC_POINTER_LOCK_FREE
32*06c3fb27SDimitry Andric #elif defined(__GCC_ATOMIC_BOOL_LOCK_FREE)
33*06c3fb27SDimitry Andric #  define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
34*06c3fb27SDimitry Andric #  define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
35*06c3fb27SDimitry Andric #  ifndef _LIBCPP_HAS_NO_CHAR8_T
36*06c3fb27SDimitry Andric #    define ATOMIC_CHAR8_T_LOCK_FREE __GCC_ATOMIC_CHAR8_T_LOCK_FREE
37*06c3fb27SDimitry Andric #  endif
38*06c3fb27SDimitry Andric #  define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
39*06c3fb27SDimitry Andric #  define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
40*06c3fb27SDimitry Andric #  define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
41*06c3fb27SDimitry Andric #  define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
42*06c3fb27SDimitry Andric #  define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
43*06c3fb27SDimitry Andric #  define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
44*06c3fb27SDimitry Andric #  define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
45*06c3fb27SDimitry Andric #  define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
46*06c3fb27SDimitry Andric #endif
47*06c3fb27SDimitry Andric 
48*06c3fb27SDimitry Andric #endif // _LIBCPP___ATOMIC_ATOMIC_LOCK_FREE_H
49