Can never sleep in get_task() unless the system can wake up at the
next event. In the case of buttons, this works fine. In the case
of timers, the only possible wake-up is when a timer overflows. This
means a new timer module.
_task_bitno = 0;
}
}
-#if 0
- /* Something like this when we have a crystal. But watch for the race of
- * going to sleep when a task is posted by an ISR.
- */
- else
- SLEEP();
-#endif
} while (t == -1 && block == 1);
return t;
}