Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/atomic_flag_clear_explicit.c
35260 views
//===-- atomic_flag_clear_explicit.c --------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file implements atomic_flag_clear_explicit from C11's stdatomic.h.9//10//===----------------------------------------------------------------------===//1112#ifndef __has_include13#define __has_include(inc) 014#endif1516#if __has_include(<stdatomic.h>)1718#include <stdatomic.h>19#undef atomic_flag_clear_explicit20void atomic_flag_clear_explicit(volatile atomic_flag *object,21memory_order order) {22__c11_atomic_store(&(object)->_Value, 0, order);23}2425#endif262728