If the current thread blocks, we should yield the Capability
immediately, because the thread and hence possibly the current Task
are now owned by someone else. This worked in the old scheduler, but
we moved where the yield happens in the new scheduler which broke it.
// ASSERT_FULL_CAPABILITY_INVARIANTS(cap,task);
}
+ yield:
scheduleYield(&cap,task);
if (emptyRunQueue(cap)) continue; // look for work again
#endif
debugTrace(DEBUG_sched,
"--<< thread %lu (%s) stopped: blocked",
(unsigned long)t->id, whatNext_strs[t->what_next]);
- continue;
+ goto yield;
}
#endif