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: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/428576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
GangCao 2018-10-10 13:23:02 -04:00 committed by Jim Harris
parent 5e2a99e508
commit 3daa9e6f75

View File

@ -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 {