CNDP  22.08.0
cne_per_thread.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_PER_THREAD_H_
6 #define _CNE_PER_THREAD_H_
7 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
30 #define CNE_DEFINE_PER_THREAD(type, name) __thread __typeof__(type) per_thread_##name
31 
35 #define CNE_DECLARE_PER_THREAD(type, name) extern __thread __typeof__(type) per_thread_##name
36 
40 #define CNE_PER_THREAD(name) (per_thread_##name)
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif /* _CNE_PER_THREAD_H_ */