From ad9e7060ed8f4db7ef090fa65b16ffb38d0994ea Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Tue, 10 Oct 2017 18:30:57 +0200 Subject: [PATCH] env: add SPDK_ENV_LCORE_ID_ANY Added a copy of DPDK's LCORE_ID_ANY. It's returned by some env functions, e.g. spdk_env_get_current_core. Change-Id: I19079a5bd714e32c309e5078e8de97ff1849c0aa Signed-off-by: Dariusz Stojaczyk Reviewed-on: https://review.gerrithub.io/382025 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp --- include/spdk/env.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/spdk/env.h b/include/spdk/env.h index 3f20c86e8..29f3e5071 100644 --- a/include/spdk/env.h +++ b/include/spdk/env.h @@ -46,6 +46,7 @@ extern "C" { #endif #define SPDK_ENV_SOCKET_ID_ANY (-1) +#define SPDK_ENV_LCORE_ID_ANY (UINT32_MAX) struct spdk_pci_device; @@ -182,9 +183,11 @@ size_t spdk_mempool_count(const struct spdk_mempool *pool); uint32_t spdk_env_get_core_count(void); /** - * \brief Return the CPU core index of the current thread. This - * will only function when called from threads set up by - * this environment abstraction. + * \brief Return the CPU core index of the current thread. + * + * This will only function when called from threads set up by + * this environment abstraction. For any other threads + * \c SPDK_ENV_LCORE_ID_ANY will be returned. */ uint32_t spdk_env_get_current_core(void);