Timerid is passed by value, not reference. Compiler cannot detect this problem because timer_t is defined as a void ptr on Linux.
Signed-off-by: Ola Liljedahl <[email protected]> --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) Broken code worked anyway on x86-64 and ARMv7 targets but bug was detected on i386 target or -m32 build on x86-64 target. platform/linux-generic/odp_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index ef26b02..3ba32a1 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -659,7 +659,7 @@ static void itimer_init(odp_timer_pool *tp) ispec.it_value.tv_sec = (time_t)sec; ispec.it_value.tv_nsec = (long)nsec; - if (timer_settime(&tp->timerid, 0, &ispec, NULL)) + if (timer_settime(tp->timerid, 0, &ispec, NULL)) ODP_ABORT("timer_settime() returned error %s\n", strerror(errno)); } -- 1.9.1 _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
