Commit 57706d18 authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Jim Harris
Browse files

thread: add spdk_thread_get_cpumask()

parent f71fed21
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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().
+6 −0
Original line number Diff line number Diff line
@@ -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)
{