mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-15 09:17:58 -05:00
Kernel: Correct Cancel Synchronization.
This commit corrects the behavior of cancel synchronization when the thread is running/ready and ensures the next wait is cancelled as it's suppose to.
This commit is contained in:
committed by
FernandoS27
parent
bb31df62bb
commit
7d16b2d2dd
@ -132,8 +132,11 @@ void Thread::ResumeFromWait() {
|
||||
}
|
||||
|
||||
void Thread::CancelWait() {
|
||||
ASSERT(GetStatus() == ThreadStatus::WaitSynch);
|
||||
ClearWaitObjects();
|
||||
if (GetSchedulingStatus() != ThreadSchedStatus::Paused) {
|
||||
is_sync_cancelled = true;
|
||||
return;
|
||||
}
|
||||
is_sync_cancelled = false;
|
||||
SetWaitSynchronizationResult(ERR_SYNCHRONIZATION_CANCELED);
|
||||
ResumeFromWait();
|
||||
}
|
||||
|
Reference in New Issue
Block a user