altos: Add ao_task_minimize_latency to reduce IRQ delays
authorKeith Packard <keithp@keithp.com>
Sat, 1 Dec 2012 00:05:19 +0000 (16:05 -0800)
committerKeith Packard <keithp@keithp.com>
Sat, 1 Dec 2012 00:05:19 +0000 (16:05 -0800)
commitae0ddb0f866a26867f0147e0811717810f74c9ef
tree167086fe7682848e3b0a3d72bd73b4e596b3775c
parentf2c2d04f07253a90c4f7da49df43c3969119516b
altos: Add ao_task_minimize_latency to reduce IRQ delays

When set, this causes the task switching code to avoid blocking IRQs
while looking for an idle task as that can increase IRQ latencies
enough to drop characters at 115200 baud on the cc1111. Note that this
*also* eliminates the ability to use low power modes as we cannot know
at any point whether some interrupt has come along and woken a task.

Has no effect when using task queues as those require IRQs to be
blocked while looking at the queue. Shouldn't be a problem there
though as the check for no running tasks is very cheap.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_task.c
src/core/ao_task.h