DPDK  18.11.11
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 #include <pthread.h>
26 
32 #define RTE_DEFINE_PER_LCORE(type, name) \
33  __thread __typeof__(type) per_lcore_##name
34 
38 #define RTE_DECLARE_PER_LCORE(type, name) \
39  extern __thread __typeof__(type) per_lcore_##name
40 
44 #define RTE_PER_LCORE(name) (per_lcore_##name)
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 
50 #endif /* _RTE_PER_LCORE_H_ */