thread: add spdk_thread_get_cpumask()
Change-Id: I2811bdbbecb28c83403ebe94834afd9a808f12a4 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452203 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
f71fed216c
commit
57706d1824
@ -226,6 +226,15 @@ void spdk_thread_exit(struct spdk_thread *thread);
|
||||
*/
|
||||
void *spdk_thread_get_ctx(struct spdk_thread *thread);
|
||||
|
||||
/**
|
||||
* Get the thread's cpumask.
|
||||
*
|
||||
* \param thread The thread to get the cpumask for.
|
||||
*
|
||||
* \return cpuset pointer
|
||||
*/
|
||||
struct spdk_cpuset *spdk_thread_get_cpumask(struct spdk_thread *thread);
|
||||
|
||||
/**
|
||||
* Return the thread object associated with the context handle previously
|
||||
* obtained by calling spdk_thread_get_ctx().
|
||||
|
@ -339,6 +339,12 @@ spdk_thread_get_ctx(struct spdk_thread *thread)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct spdk_cpuset *
|
||||
spdk_thread_get_cpumask(struct spdk_thread *thread)
|
||||
{
|
||||
return thread->cpumask;
|
||||
}
|
||||
|
||||
struct spdk_thread *
|
||||
spdk_thread_get_from_ctx(void *ctx)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user