Commit 3daa9e6f authored by GangCao's avatar GangCao Committed by Jim Harris
Browse files

lib/event: update the check of poller returned status



Per the definition of the poller returned value
 * return 0 to indicate that polling took place but no events were found;
 * return positive to indicate that polling took place and some events were processed;
 * return negative if the poller does not provide spin-wait information.

Have a change to compare whether positive.

Change-Id: Ic01fe7a663afeccbb145979670234e023dac1d07
Signed-off-by: default avatarGangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/428576


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarXiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 5e2a99e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -420,7 +420,7 @@ spdk_reactor_add_tsc_stats(void *arg, int rc, uint64_t now)
	if (rc == 0) {
		/* Poller status idle */
		tsc_stats->idle_tsc += now - reactor->tsc_last;
	} else if (rc == 1) {
	} else if (rc > 0) {
		/* Poller status busy */
		tsc_stats->busy_tsc += now - reactor->tsc_last;
	} else {