zephyr/samples/microkernel/test/test_timer/src
Benjamin Walsh a73af53186 timers: prevent duration of 0 in timer_start/restart
Basically, this does not work anymore:

  task_timer_start(<timer>, 0, X, <sem>);

since it does not make much sense to have a timer with an expiry of 0
ticks. The code internally was setting the duration to be equal to the
period anyway. So, to achieve the same behaviour, do this:

  task_timer_start(<timer>, X, X, <sem>);

This has the positive side-effect of removing a small block of logic
that was handling the cases where duration was 0.

Change-Id: Ic4af4a17a129f14af4fea445bcaddabe89c27131
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
..
fifo_timeout.c test_timer: test timeouts/timers in microkernel 2016-02-05 20:14:22 -05:00
Makefile test_timer: test timeouts/timers in microkernel 2016-02-05 20:14:22 -05:00
timer.c timers: prevent duration of 0 in timer_start/restart 2016-02-05 20:15:21 -05:00