From ebb8c88a5991333606900a4234ecafc402b5d2b7 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Tue, 10 Dec 2013 11:16:05 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/179460 Reviewed-by: Vincent Palatin --- common/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/timer.c b/common/timer.c index 0256d673bc..810a28c7d2 100644 --- a/common/timer.c +++ b/common/timer.c @@ -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) && -- cgit v1.2.1