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. llvm-svn: 236805
20 lines
651 B
C
20 lines
651 B
C
/*===-- atomic_thread_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_thread_fence from C11's stdatomic.h.
|
|
*
|
|
*===------------------------------------------------------------------------===
|
|
*/
|
|
|
|
#include <stdatomic.h>
|
|
#undef atomic_thread_fence
|
|
void atomic_thread_fence(memory_order order) {
|
|
__c11_atomic_thread_fence(order);
|
|
}
|