fix: use right var to prevent crash
This commit is contained in:
@ -20,7 +20,7 @@ static struct list *get_thread_to_switch(void)
|
|||||||
it_t = current_tcb == NULL ? NULL : current_tcb->next;
|
it_t = current_tcb == NULL ? NULL : current_tcb->next;
|
||||||
while (it_p) {
|
while (it_p) {
|
||||||
while (it_t != NULL) {
|
while (it_t != NULL) {
|
||||||
if (it_t != NULL && CURRENT_TCB->state != WAITING)
|
if (it_t != NULL && ((struct tcb*)it_t->content)->state != WAITING)
|
||||||
return it_t;
|
return it_t;
|
||||||
it_t = it_t->next;
|
it_t = it_t->next;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user