app: add function to get current core ID
Change-Id: I3428fc9944f7117facc6488489187dcf8b6ed825 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
268ee865ab
commit
ac7151b161
@ -198,6 +198,11 @@ uint64_t spdk_app_get_core_mask(void);
|
||||
*/
|
||||
int spdk_app_get_core_count(void);
|
||||
|
||||
/**
|
||||
* \brief Return the lcore of the current thread.
|
||||
*/
|
||||
uint32_t spdk_app_get_current_core(void);
|
||||
|
||||
/**
|
||||
* \brief Allocate an event to be passed to \ref spdk_event_call
|
||||
*/
|
||||
|
@ -361,6 +361,12 @@ spdk_app_get_core_count(void)
|
||||
return g_reactor_count;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
spdk_app_get_current_core(void)
|
||||
{
|
||||
return rte_lcore_id();
|
||||
}
|
||||
|
||||
int
|
||||
spdk_app_parse_core_mask(const char *mask, uint64_t *cpumask)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user