DPDK  24.03.0
rte_per_lcore.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2014 Intel Corporation
3  */
4 
5 #ifndef _RTE_PER_LCORE_H_
6 #define _RTE_PER_LCORE_H_
7 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #ifdef RTE_TOOLCHAIN_MSVC
26 #define RTE_DEFINE_PER_LCORE(type, name) \
27  __declspec(thread) type per_lcore_##name
28 
29 #define RTE_DECLARE_PER_LCORE(type, name) \
30  extern __declspec(thread) type per_lcore_##name
31 #else
32 
37 #define RTE_DEFINE_PER_LCORE(type, name) \
38  __thread type per_lcore_##name
39 
43 #define RTE_DECLARE_PER_LCORE(type, name) \
44  extern __thread type per_lcore_##name
45 #endif
46 
50 #define RTE_PER_LCORE(name) (per_lcore_##name)
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif /* _RTE_PER_LCORE_H_ */