Files
OpenCellular/core
Vincent Palatin 765386a623 fix task stuck on timer wake-up event
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
2012-04-12 23:12:42 +00:00
..