kern: split Process/Thread exit to separate WorkerTaskManagers
This commit is contained in:
@@ -476,10 +476,6 @@ namespace ams::kern {
|
||||
m_parent->ClearRunningThread(this);
|
||||
}
|
||||
|
||||
/* Signal. */
|
||||
m_signaled = true;
|
||||
KSynchronizationObject::NotifyAvailable();
|
||||
|
||||
/* Call the on thread termination handler. */
|
||||
KThreadContext::OnThreadTerminating(this);
|
||||
|
||||
@@ -507,6 +503,13 @@ namespace ams::kern {
|
||||
cpu::SynchronizeCores(m_parent->GetPhysicalCoreMask());
|
||||
}
|
||||
|
||||
/* Acquire the scheduler lock. */
|
||||
KScopedSchedulerLock sl;
|
||||
|
||||
/* Signal. */
|
||||
m_signaled = true;
|
||||
KSynchronizationObject::NotifyAvailable();
|
||||
|
||||
/* Close the thread. */
|
||||
this->Close();
|
||||
}
|
||||
@@ -1328,7 +1331,7 @@ namespace ams::kern {
|
||||
this->StartTermination();
|
||||
|
||||
/* Register the thread as a work task. */
|
||||
KWorkerTaskManager::AddTask(KWorkerTaskManager::WorkerType_Exit, this);
|
||||
KWorkerTaskManager::AddTask(KWorkerTaskManager::WorkerType_ExitThread, this);
|
||||
}
|
||||
|
||||
MESOSPHERE_PANIC("KThread::Exit() would return");
|
||||
|
||||
Reference in New Issue
Block a user