Commit ad9e7060 authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Jim Harris
Browse files

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: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/382025


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 6c0233c0
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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);