thread: Export spdk_set_thread()
Export the spdk_set_thread(), so that apps may use it to associate a thread with SPDK thread when necessary. Change-Id: I488bea639729d68d7261a497085bbec274357224 Signed-off-by: Niu Yawei <yawei.niu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461509 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
9d5037275d
commit
0901744bb1
@ -205,6 +205,13 @@ void spdk_thread_lib_fini(void);
|
||||
*/
|
||||
struct spdk_thread *spdk_thread_create(const char *name, struct spdk_cpuset *cpumask);
|
||||
|
||||
/**
|
||||
* Force the current system thread to act as if executing the given SPDK thread.
|
||||
*
|
||||
* \param thread The thread to set.
|
||||
*/
|
||||
void spdk_set_thread(struct spdk_thread *thread);
|
||||
|
||||
/**
|
||||
* Mark the thread as exited, failing all future spdk_thread_poll() calls. May
|
||||
* only be called within an spdk poller or message.
|
||||
|
@ -38,10 +38,4 @@
|
||||
|
||||
struct spdk_thread;
|
||||
|
||||
/**
|
||||
* Force the current system thread to act as if executing the given SPDK thread.
|
||||
* This is only used for unit testing.
|
||||
*/
|
||||
void spdk_set_thread(struct spdk_thread *thread);
|
||||
|
||||
#endif /* SPDK_THREAD_INTERNAL_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user