Changed timer module to expire timers on deadline match

Modified the commond timer module to expire timers as soon as time matches
the deadline instead of only after the deadline is passed.

BRANCH=none
BUG=chrome-os-partner:24490
TEST=On a peppy:
- Run EC tests on host.
- Run all EC tests on the target.
- Keep the system on for days and occasionally verify that system is up and the keyboard is working.

On a spring:
- Run all EC tests on the target.

Change-Id: Ieabfb769cf22ff8b04ca6d0a306312b90ea20ff3
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/179460
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Alec Berg
2013-12-10 11:16:05 -08:00
committed by chrome-internal-fetch
parent e6588c803f
commit ebb8c88a59

View File

@@ -69,7 +69,7 @@ void process_timers(int overflow)
int tskid = 31 - __builtin_clz(check_timer);
/* timer has expired ? */
if (timer_deadline[tskid].val < now.val)
if (timer_deadline[tskid].val <= now.val)
expire_timer(tskid);
else if ((timer_deadline[tskid].le.hi ==
now.le.hi) &&