thread: Allow nested spdk_thread_poll calls
This wasn't allowed at first to make debugging these thread changes easier. Now they're mostly solid, so let's allow this behavior. Change-Id: Ida689c738ed550ec46c3cb6cab6788a651c6088b Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/441159 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
c43cb6a706
commit
13586cd82d
@ -328,11 +328,11 @@ int
|
||||
spdk_thread_poll(struct spdk_thread *thread, uint32_t max_msgs)
|
||||
{
|
||||
uint32_t msg_count;
|
||||
struct spdk_thread *orig_thread;
|
||||
struct spdk_poller *poller;
|
||||
int rc = 0;
|
||||
|
||||
assert(_get_thread() == NULL);
|
||||
|
||||
orig_thread = _get_thread();
|
||||
tls_thread = thread;
|
||||
|
||||
msg_count = _spdk_msg_queue_run_batch(thread, max_msgs);
|
||||
@ -395,7 +395,7 @@ spdk_thread_poll(struct spdk_thread *thread, uint32_t max_msgs)
|
||||
}
|
||||
}
|
||||
|
||||
tls_thread = NULL;
|
||||
tls_thread = orig_thread;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user