lib/event: Remove checking return code of spdk_thread_poll in _spdk_reactor_run
spdk_thread_poll returns only non-negative value now, and the return code check is not reasonable now. For just in case we may want to add assert(rc >= 0) but compiler gives warning because rc is not used anywhere. So just remove checking return code check here. We noticed first that spdk_thread_destroy was called without spdk_thread exit but this change removes spdk_thread_destroy. So the issue is also fixed together. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I4e7f5c09faf5eda68ea8d42320dbefdca88bbd21 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478237 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
ff9516bdcc
commit
2597480328
@ -355,7 +355,6 @@ _spdk_reactor_run(void *arg)
|
||||
|
||||
while (1) {
|
||||
uint64_t now;
|
||||
int rc;
|
||||
|
||||
/* For each loop through the reactor, capture the time. This time
|
||||
* is used for all threads. */
|
||||
@ -365,12 +364,7 @@ _spdk_reactor_run(void *arg)
|
||||
|
||||
TAILQ_FOREACH_SAFE(lw_thread, &reactor->threads, link, tmp) {
|
||||
thread = spdk_thread_get_from_ctx(lw_thread);
|
||||
|
||||
rc = spdk_thread_poll(thread, 0, now);
|
||||
if (rc < 0) {
|
||||
TAILQ_REMOVE(&reactor->threads, lw_thread, link);
|
||||
spdk_thread_destroy(thread);
|
||||
}
|
||||
spdk_thread_poll(thread, 0, now);
|
||||
}
|
||||
|
||||
if (g_reactor_state != SPDK_REACTOR_STATE_RUNNING) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user