Commit 25974803 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4e7f5c09faf5eda68ea8d42320dbefdca88bbd21
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478237


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent ff9516bd
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -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) {