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 <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/382025 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
6c0233c0a5
commit
ad9e7060ed
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user