We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9048464 commit 6808692Copy full SHA for 6808692
1 file changed
tuxedo/thread.c
@@ -133,10 +133,18 @@ void KThreadSuspend(KThread* t)
133
t->state = KTHR_STATE_WAITING;
134
t->wait.queue = NULL;
135
136
- if (self == t) {
137
- KThread* next = KThreadFindRunnable(s_firstThread);
+ KThread* next = NULL;
+ if (t == self || t == __ppc_next_ctx) {
138
+ next = KThreadFindRunnable(s_firstThread);
139
+ }
140
+
141
+ if (t == self) {
142
KThreadSwitchTo(next, st);
143
} else {
144
+ if (t == __ppc_next_ctx) {
145
+ __ppc_next_ctx = next != self ? next : NULL;
146
147
148
PPCIrqUnlockByMsr(st);
149
}
150
0 commit comments