]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/compiler-rt/lib/builtins/atomic_signal_fence.c
MFV r315633, 315635:
[FreeBSD/FreeBSD.git] / contrib / compiler-rt / lib / builtins / atomic_signal_fence.c
1 /*===-- atomic_signal_fence.c -----------------------------------------------===
2  *
3  *                     The LLVM Compiler Infrastructure
4  *
5  * This file is dual licensed under the MIT and the University of Illinois Open
6  * Source Licenses. See LICENSE.TXT for details.
7  *
8  *===------------------------------------------------------------------------===
9  *
10  * This file implements atomic_signal_fence from C11's stdatomic.h.
11  *
12  *===------------------------------------------------------------------------===
13  */
14
15 #ifndef __has_include
16 #define __has_include(inc) 0
17 #endif
18
19 #if __has_include(<stdatomic.h>)
20
21 #include <stdatomic.h>
22 #undef atomic_signal_fence
23 void atomic_signal_fence(memory_order order) {
24   __c11_atomic_signal_fence(order);
25 }
26
27 #endif