(This document/code contribution attached is provided under the terms of
agreement LES-LTM-21309)

The new timer API as previously discussed. A simple API that supports both
system defined and user defined timeout buffers. Timer cancel returns whether
the operation succeeded or the timer had already expired and the timeout
been enqueued. Similarly timer free supports expired timers.
It comes with a timer implementation that is lock-less on targets that support
16-byte atomics but also on other targets, common operations such as reset
timer with existing timeout buffer are lock-less.
Example and test programs that use the timer API are updated.

odp_atomic_internal.h is updated with operations (e.g. exchange, compare-and-
exchange) on 16-byte atomics. GCC on x86-64 requires the compiler flag -mcx16
to enable support for 16-byte atomics.

Ola Liljedahl (2):
  linux-generic: odp_atomic_internal.h: more atomic types
  api: odp_timer.h: New timer API and lock-less implementation

 example/timer/odp_timer_test.c                     |  164 ++-
 platform/linux-generic/include/api/odp_timer.h     |  474 +++++++--
 .../linux-generic/include/odp_atomic_internal.h    |   72 +-
 .../linux-generic/include/odp_timer_internal.h     |   69 +-
 platform/linux-generic/odp_timer.c                 | 1080 ++++++++++++++------
 test/api_test/odp_timer_ping.c                     |   96 +-
 6 files changed, 1432 insertions(+), 523 deletions(-)

-- 
1.9.1


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to