altos: Make ao_cur_task_index track ao_cur_task in ao_yield
authorKeith Packard <keithp@keithp.com>
Sun, 26 Aug 2012 16:49:34 +0000 (09:49 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 26 Aug 2012 16:49:34 +0000 (09:49 -0700)
commitd13d0fbfcb0fd6d8a1af46f6270a968d746c830e
tree2d11bfe1903361b07a1ce31c95db755f8e7d9f8d
parent1c9baa88d6cd931c66d453674322908eb267ba4c
altos: Make ao_cur_task_index track ao_cur_task in ao_yield

This keeps the two main task references (index and pointer) in
agreement during task switching, avoiding an extra assignment at the
end of the task switching loop.

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