atomic_flag_clear.c revision 287516
1219019Sgabor/*===-- atomic_flag_clear.c -------------------------------------------------===
2219019Sgabor *
3219019Sgabor *                     The LLVM Compiler Infrastructure
4219019Sgabor *
5219019Sgabor * This file is dual licensed under the MIT and the University of Illinois Open
6219019Sgabor * Source Licenses. See LICENSE.TXT for details.
7219019Sgabor *
8219019Sgabor *===------------------------------------------------------------------------===
9219019Sgabor *
10219019Sgabor * This file implements atomic_flag_clear from C11's stdatomic.h.
11219019Sgabor *
12219019Sgabor *===------------------------------------------------------------------------===
13219019Sgabor */
14219019Sgabor
15219019Sgabor#include <stdatomic.h>
16219019Sgabor#undef atomic_flag_clear
17219019Sgaborvoid atomic_flag_clear(volatile atomic_flag *object) {
18219019Sgabor  return __c11_atomic_store(&(object)->_Value, 0, __ATOMIC_SEQ_CST);
19219019Sgabor}
20219019Sgabor