mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-14 15:14:23 -04:00
kern: split Process/Thread exit to separate WorkerTaskManagers
This commit is contained in:
parent
4ddfb6183c
commit
f93aea4c06
4 changed files with 15 additions and 10 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue