CNDP  22.08.0
cne_atomic.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2019-2022 Intel Corporation.
3  */
4 
5 #ifndef _CNE_ATOMIC_H_
6 #define _CNE_ATOMIC_H_
7 
12 #ifndef __cplusplus
13 #include <stdatomic.h>
14 #define CNE_ATOMIC(X) atomic_##X
15 #define CNE_MEMORY_ORDER(X) memory_order_##X
16 #else
17 #include <atomic>
18 #define CNE_ATOMIC(X) std::atomic<X>
19 #define CNE_MEMORY_ORDER(X) std::memory_order_##X
20 #endif
21 
22 #endif /* _CNE_ATOMIC_H_ */