altos: Avoid modulus in task queue on parts without idiv
authorKeith Packard <keithp@keithp.com>
Sun, 13 Nov 2022 06:47:00 +0000 (22:47 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 13 Nov 2022 08:17:32 +0000 (00:17 -0800)
commit8c0a7dfa4ba4b46dabce0ac7daecf0edd5fb6b62
treefa3b916f15114bf0ba8ed3dc2fc8b8b7010ca19d
parentbf51520898fb30b289b2e03b31a1719c172cf422
altos: Avoid modulus in task queue on parts without idiv

Cortex-M0 parts don't have a hardware divide, so doing a modulus
to compute task hash indexes is super slow. Avoid that by making the sleep
queue a power of two.

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