From 0c904ece562d5c6f9df57e42b56dd5533db7d2bb Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 8 May 2015 05:39:05 +0000 Subject: builtins: Implement the functions from stdatomic.h Talking to John and Doug, we concluded that these functions from stdatomic really do belong here in compiler-rt rather than in libc, since the compiler owns stdatomic.h and these need to refer to clang-specific builtins. Nonetheless, I've only added these on darwin for now - other platforms should probably do the same unless their libc does implement these functions. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236805 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/builtins/atomic_signal_fence.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/builtins/atomic_signal_fence.c (limited to 'lib/builtins/atomic_signal_fence.c') diff --git a/lib/builtins/atomic_signal_fence.c b/lib/builtins/atomic_signal_fence.c new file mode 100644 index 000000000..ad292d2f1 --- /dev/null +++ b/lib/builtins/atomic_signal_fence.c @@ -0,0 +1,19 @@ +/*===-- atomic_signal_fence.c -----------------------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + *===------------------------------------------------------------------------=== + * + * This file implements atomic_signal_fence from C11's stdatomic.h. + * + *===------------------------------------------------------------------------=== + */ + +#include +#undef atomic_signal_fence +void atomic_signal_fence(memory_order order) { + __c11_atomic_signal_fence(order); +} -- cgit v1.2.3