SVC: Correct WaitSynchronization, WaitProcessWideKey, SignalProcessWideKey.

This commit is contained in:
Fernando Sahmkow 2020-02-26 22:26:53 -04:00
parent 5b6a67f849
commit d4ebb510a0
9 changed files with 84 additions and 33 deletions

View file

@ -49,12 +49,12 @@ Thread::~Thread() = default;
void Thread::Stop() {
SchedulerLock lock(kernel);
// Cancel any outstanding wakeup events for this thread
Signal();
Core::System::GetInstance().CoreTiming().UnscheduleEvent(kernel.ThreadWakeupCallbackEventType(),
global_handle);
kernel.GlobalHandleTable().Close(global_handle);
global_handle = 0;
SetStatus(ThreadStatus::Dead);
Signal();
owner_process->UnregisterThread(this);