X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_lcore.h;h=e03264e35fb31a7ed8fc30de05935468a055de22;hb=2e83c81bade9a69197929490c68cb98289cb091e;hp=4165b72ab5c4f36401a3a2e7da71ef0e0db5c4a6;hpb=8baacdd30e5553ce6e0c84a0a3e09d8636386503;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h index 4165b72ab5..e03264e35f 100644 --- a/lib/librte_eal/common/include/rte_lcore.h +++ b/lib/librte_eal/common/include/rte_lcore.h @@ -48,7 +48,7 @@ extern "C" { #endif -#define LCORE_ID_ANY -1 /**< Any lcore. */ +#define LCORE_ID_ANY UINT32_MAX /**< Any lcore. */ #if defined(__linux__) typedef cpu_set_t rte_cpuset_t; @@ -81,13 +81,12 @@ struct lcore_config { extern struct lcore_config lcore_config[RTE_MAX_LCORE]; RTE_DECLARE_PER_LCORE(unsigned, _lcore_id); /**< Per thread "lcore id". */ -RTE_DECLARE_PER_LCORE(unsigned, _socket_id); /**< Per thread "socket id". */ RTE_DECLARE_PER_LCORE(rte_cpuset_t, _cpuset); /**< Per thread "cpuset". */ /** * Return the ID of the execution unit we are running on. * @return - * Logical core ID + * Logical core ID (in EAL thread) or LCORE_ID_ANY (in non-EAL thread) */ static inline unsigned rte_lcore_id(void) @@ -145,11 +144,7 @@ rte_lcore_index(int lcore_id) * @return * the ID of current lcoreid's physical socket */ -static inline unsigned -rte_socket_id(void) -{ - return RTE_PER_LCORE(_socket_id); -} +unsigned rte_socket_id(void); /** * Get the ID of the physical socket of the specified lcore