mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-23 02:19:19 +01:00
Always set forceYield
for running threads in PauseThread
`forceYield` was incorrectly not set when pausing running threads if the thread already had `pendingYield` set. This could lead to cases where `Rotate` would later throw an exception due to it being unset.
This commit is contained in:
parent
6645692288
commit
8b973a3de3
@ -379,10 +379,12 @@ namespace skyline::kernel {
|
|||||||
if (it == core->queue.begin() && it != core->queue.end())
|
if (it == core->queue.begin() && it != core->queue.end())
|
||||||
(*it)->scheduleCondition.notify_one();
|
(*it)->scheduleCondition.notify_one();
|
||||||
|
|
||||||
if (it == core->queue.begin() && !thread->pendingYield) {
|
if (it == core->queue.begin()) {
|
||||||
// We need to send a yield signal to the thread if it's currently running
|
// We need to send a yield signal to the thread if it's currently running
|
||||||
thread->SendSignal(YieldSignal);
|
if (!thread->pendingYield) {
|
||||||
thread->pendingYield = true;
|
thread->SendSignal(YieldSignal);
|
||||||
|
thread->pendingYield = true;
|
||||||
|
}
|
||||||
thread->forceYield = true;
|
thread->forceYield = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user