mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 20:55:29 +03: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())
|
||||
(*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
|
||||
thread->SendSignal(YieldSignal);
|
||||
thread->pendingYield = true;
|
||||
if (!thread->pendingYield) {
|
||||
thread->SendSignal(YieldSignal);
|
||||
thread->pendingYield = true;
|
||||
}
|
||||
thread->forceYield = true;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user