Depending on resolution, a low nsec value could be converted to 0 cycles, wich was specified as ODP_SCHED_WAIT and would instruct a schedule call to wait forever.
Also ODP_SCHED_NO_WAIT corresponds to 1 tick, it's rarely but can wait a little, when shced time has slower rate. It should correspond to schedule only once. So, change ODP_SCHED_NO_WAIT to 0 and ODP_SCHED_NO_WAIT to UINT64_MAX. Signed-off-by: Ivan Khoronzhuk <ivan.khoronz...@linaro.org> --- platform/linux-generic/include/odp/plat/schedule_types.h | 4 ++-- platform/linux-generic/odp_schedule.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/platform/linux-generic/include/odp/plat/schedule_types.h b/platform/linux-generic/include/odp/plat/schedule_types.h index c48b652..8cdc40b 100644 --- a/platform/linux-generic/include/odp/plat/schedule_types.h +++ b/platform/linux-generic/include/odp/plat/schedule_types.h @@ -22,8 +22,8 @@ extern "C" { * @{ */ -#define ODP_SCHED_WAIT 0 -#define ODP_SCHED_NO_WAIT 1 +#define ODP_SCHED_WAIT UINT64_MAX +#define ODP_SCHED_NO_WAIT 0 typedef int odp_schedule_prio_t; diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index c6619e5..827fcf0 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -646,9 +646,6 @@ void odp_schedule_resume(void) uint64_t odp_schedule_wait_time(uint64_t ns) { - if (ns <= ODP_SCHED_NO_WAIT) - ns = ODP_SCHED_NO_WAIT + 1; - return odp_time_ns_to_cycles(ns); } -- 1.9.1 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp