mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 14:52:45 +01:00
kernel: signal thread on termination completed
This commit is contained in:
parent
bb195c2c2b
commit
dcfe674ed4
1 changed files with 7 additions and 4 deletions
|
@ -415,10 +415,6 @@ void KThread::StartTermination() {
|
|||
m_parent->ClearRunningThread(this);
|
||||
}
|
||||
|
||||
// Signal.
|
||||
m_signaled = true;
|
||||
KSynchronizationObject::NotifyAvailable();
|
||||
|
||||
// Clear previous thread in KScheduler.
|
||||
KScheduler::ClearPreviousThread(m_kernel, this);
|
||||
|
||||
|
@ -437,6 +433,13 @@ void KThread::FinishTermination() {
|
|||
}
|
||||
}
|
||||
|
||||
// Acquire the scheduler lock.
|
||||
KScopedSchedulerLock sl{m_kernel};
|
||||
|
||||
// Signal.
|
||||
m_signaled = true;
|
||||
KSynchronizationObject::NotifyAvailable();
|
||||
|
||||
// Close the thread.
|
||||
this->Close();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue