Skip to content

Commit 3f270d0

Browse files
committed
tuxedo: fix KThreadYield from ISR when the current thread is the idle thread
1 parent 6808692 commit 3f270d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tuxedo/thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void KThreadYield(void)
189189
PPCIrqState st = PPCIrqLockByMsr();
190190

191191
KThread* t = KThreadFindRunnable(self->next);
192-
if (t->prio > self->prio) {
192+
if (!t || t->prio > self->prio) {
193193
t = KThreadFindRunnable(s_firstThread);
194194
}
195195

0 commit comments

Comments
 (0)