libmetal
atomic.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /*
8  * @file atomic.h
9  * @brief Atomic primitives for libmetal.
10  */
11 
12 #ifndef __METAL_ATOMIC__H__
13 #define __METAL_ATOMIC__H__
14 
15 #include <metal/config.h>
16 
17 #if defined(HAVE_STDATOMIC_H) && !defined(__STDC_NO_ATOMICS__) && \
18  !defined(__cplusplus)
19 # include <stdatomic.h>
20 #elif defined(__GNUC__)
21 # include <metal/compiler/gcc/atomic.h>
22 #else
23 # include <metal/processor/@PROJECT_PROCESSOR@/atomic.h>
24 #endif
25 
26 #endif /* __METAL_ATOMIC__H__ */