altos: Make ao_delay(0) not wait forever
authorKeith Packard <keithp@keithp.com>
Wed, 29 Jun 2016 19:52:37 +0000 (12:52 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 30 Jun 2016 02:17:45 +0000 (19:17 -0700)
commit349a63aeed6cdeb89bf18c7b2e2c40782c79cc00
treebda1a149de2f0da47e5051eb98b539716a61cd07
parent3b3a24f5f39a1b72cc8947c33b609f454b46aff8
altos: Make ao_delay(0) not wait forever

ao_delay() is implemented on top of ao_sleep_for, and ao_sleep_for
uses the timeout value of 0 to indicate an infinite timeout. Calls to
ao_delay for 0 ticks would unintentionally hit this case and end up
waiting forever.x

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