mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
motion: fix task to guarantee task never exits
Fix motion_sense task to make sure the task never exits. Note, before this change a task_wake(TASK_ID_MOTIONSENSE) would end the task because task_wait_event() would return 0. BUG=none BRANCH=smaug TEST=with following CL, run motion_lid test and make sure it passes Change-Id: I67bd2e535d67215baa0cc1dfd0010b8199152dbd Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/300630 Commit-Ready: Gwendal Grignou <gwendal@chromium.org> Tested-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
This commit is contained in:
@@ -539,7 +539,7 @@ void motion_sense_task(void)
|
||||
#ifdef CONFIG_ACCEL_FIFO
|
||||
ts_last_int = get_time();
|
||||
#endif
|
||||
do {
|
||||
while (1) {
|
||||
ts_begin_task = get_time();
|
||||
ready_status = 0;
|
||||
for (i = 0; i < motion_sensor_count; ++i) {
|
||||
@@ -641,7 +641,8 @@ void motion_sense_task(void)
|
||||
wait_us = -1;
|
||||
}
|
||||
|
||||
} while ((event = task_wait_event(wait_us)));
|
||||
event = task_wait_event(wait_us);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACCEL_FIFO
|
||||
|
||||
Reference in New Issue
Block a user