run with interrupts off, which is really bad...
thread_root (void (*function) (void *aux), void *aux)
{
ASSERT (function != NULL);
thread_root (void (*function) (void *aux), void *aux)
{
ASSERT (function != NULL);
function (aux);
thread_exit ();
}
function (aux);
thread_exit ();
}
list_remove (&t->rq_elem);
t->status = THREAD_RUNNING;
switch_threads (NULL, t);
list_remove (&t->rq_elem);
t->status = THREAD_RUNNING;
switch_threads (NULL, t);