blob: 7d95f27f9ba2dcebb3f45e1453c86f635a7c4c5d [file] [log] [blame]
Justin Bognerfa752592015-05-08 05:39:05 +00001/*===-- atomic_thread_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_thread_fence from C11's stdatomic.h.
11 *
12 *===------------------------------------------------------------------------===
13 */
14
Chris Bieneman7908b122015-09-22 21:50:43 +000015#if __has_include(<stdatomic.h>)
16
Justin Bognerfa752592015-05-08 05:39:05 +000017#include <stdatomic.h>
18#undef atomic_thread_fence
19void atomic_thread_fence(memory_order order) {
20 __c11_atomic_thread_fence(order);
21}
Chris Bieneman7908b122015-09-22 21:50:43 +000022
23#endif