mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 18:41:11 +00:00
When we are in interrupt context and doing a task_set_event, if we are interrupted by a timer interrupt firing, we might end resetting the runnable bit added by the expiration of a timer (when finishing the interrupted read-modify-write to tasks_ready). So we need to have an atomic access there. We don't need to atomic primitives (and the associated overhead) on other tasks_ready accesses because there are always done at the highest priority. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:8721 TEST=from Linux, run "ectool lightbar test" several times and see that the keyboard task no longer ends up stuck with a timer event set and no runnable bit. Change-Id: Ied45ee33cb6aba4549626d35d694f1c259f2400c