summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2020-07-12 00:21:52 -0600
committerCommit Bot <commit-bot@chromium.org>2020-07-13 21:27:29 +0000
commit6b101e8bac62e0be5449d1266eab2b343c63b247 (patch)
treeebac8dd2a99ce4b4c9e9a0d62e4f2f817fe2498f /core
parent8da624c01edba2410578928c6abf9094437144e4 (diff)
downloadchrome-ec-6b101e8bac62e0be5449d1266eab2b343c63b247.tar.gz
host: Fix task_wait_event() to return TASK_EVENT_TIMER
BUG=none BRANCH=none TEST=make -j runhosttests Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ibd753b2eec5d81438dc0884b1a0c12c4c319afe2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2294164 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/host/task.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/host/task.c b/core/host/task.c
index 9f52fad340..7bd44c61b9 100644
--- a/core/host/task.c
+++ b/core/host/task.c
@@ -438,6 +438,9 @@ void task_scheduler(void)
if (i < 0)
i = fast_forward();
+ now = get_time();
+ if (now.val >= tasks[i].wake_time.val)
+ tasks[i].event |= TASK_EVENT_TIMER;
tasks[i].wake_time.val = ~0ull;
running_task_id = i;
tasks[i].started = 1;