xref: /freebsd/contrib/llvm-project/libcxx/include/__atomic/fence.h (revision cb14a3fe5122c879eae1fb480ed7ce82a699ddb6)
106c3fb27SDimitry Andric //===----------------------------------------------------------------------===//
206c3fb27SDimitry Andric //
306c3fb27SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
406c3fb27SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
506c3fb27SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
606c3fb27SDimitry Andric //
706c3fb27SDimitry Andric //===----------------------------------------------------------------------===//
806c3fb27SDimitry Andric 
906c3fb27SDimitry Andric #ifndef _LIBCPP___ATOMIC_FENCE_H
1006c3fb27SDimitry Andric #define _LIBCPP___ATOMIC_FENCE_H
1106c3fb27SDimitry Andric 
1206c3fb27SDimitry Andric #include <__atomic/cxx_atomic_impl.h>
1306c3fb27SDimitry Andric #include <__atomic/memory_order.h>
1406c3fb27SDimitry Andric #include <__config>
1506c3fb27SDimitry Andric 
1606c3fb27SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
1706c3fb27SDimitry Andric #  pragma GCC system_header
1806c3fb27SDimitry Andric #endif
1906c3fb27SDimitry Andric 
2006c3fb27SDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
2106c3fb27SDimitry Andric 
22*cb14a3feSDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void atomic_thread_fence(memory_order __m) _NOEXCEPT { __cxx_atomic_thread_fence(__m); }
2306c3fb27SDimitry Andric 
24*cb14a3feSDimitry Andric inline _LIBCPP_HIDE_FROM_ABI void atomic_signal_fence(memory_order __m) _NOEXCEPT { __cxx_atomic_signal_fence(__m); }
2506c3fb27SDimitry Andric 
2606c3fb27SDimitry Andric _LIBCPP_END_NAMESPACE_STD
2706c3fb27SDimitry Andric 
2806c3fb27SDimitry Andric #endif // _LIBCPP___ATOMIC_FENCE_H
29