mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-15 09:36:35 +00:00
kern: KWorkerTaskManager no longer tracks id
This commit is contained in:
parent
e105b39ae7
commit
0230609cca
3 changed files with 4 additions and 8 deletions
|
@ -33,7 +33,6 @@ namespace ams::kern {
|
||||||
KWorkerTask *m_head_task;
|
KWorkerTask *m_head_task;
|
||||||
KWorkerTask *m_tail_task;
|
KWorkerTask *m_tail_task;
|
||||||
KThread *m_thread;
|
KThread *m_thread;
|
||||||
WorkerType m_type;
|
|
||||||
bool m_active;
|
bool m_active;
|
||||||
private:
|
private:
|
||||||
static void ThreadFunction(uintptr_t arg);
|
static void ThreadFunction(uintptr_t arg);
|
||||||
|
@ -42,9 +41,9 @@ namespace ams::kern {
|
||||||
KWorkerTask *GetTask();
|
KWorkerTask *GetTask();
|
||||||
void AddTask(KWorkerTask *task);
|
void AddTask(KWorkerTask *task);
|
||||||
public:
|
public:
|
||||||
constexpr KWorkerTaskManager() : m_head_task(), m_tail_task(), m_thread(), m_type(WorkerType_Count), m_active() { /* ... */ }
|
constexpr KWorkerTaskManager() : m_head_task(), m_tail_task(), m_thread(), m_active() { /* ... */ }
|
||||||
|
|
||||||
NOINLINE void Initialize(WorkerType wt, s32 priority);
|
NOINLINE void Initialize(s32 priority);
|
||||||
static void AddTask(WorkerType type, KWorkerTask *task);
|
static void AddTask(WorkerType type, KWorkerTask *task);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,7 @@
|
||||||
|
|
||||||
namespace ams::kern {
|
namespace ams::kern {
|
||||||
|
|
||||||
void KWorkerTaskManager::Initialize(WorkerType wt, s32 priority) {
|
void KWorkerTaskManager::Initialize(s32 priority) {
|
||||||
/* Set type, other members already initialized in constructor. */
|
|
||||||
m_type = wt;
|
|
||||||
|
|
||||||
/* Reserve a thread from the system limit. */
|
/* Reserve a thread from the system limit. */
|
||||||
MESOSPHERE_ABORT_UNLESS(Kernel::GetSystemResourceLimit().Reserve(ams::svc::LimitableResource_ThreadCountMax, 1));
|
MESOSPHERE_ABORT_UNLESS(Kernel::GetSystemResourceLimit().Reserve(ams::svc::LimitableResource_ThreadCountMax, 1));
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ namespace ams::kern {
|
||||||
/* Perform more core-0 specific initialization. */
|
/* Perform more core-0 specific initialization. */
|
||||||
if (core_id == 0) {
|
if (core_id == 0) {
|
||||||
/* Initialize the exit worker manager, so that threads and processes may exit cleanly. */
|
/* Initialize the exit worker manager, so that threads and processes may exit cleanly. */
|
||||||
Kernel::GetWorkerTaskManager(KWorkerTaskManager::WorkerType_Exit).Initialize(KWorkerTaskManager::WorkerType_Exit, KWorkerTaskManager::ExitWorkerPriority);
|
Kernel::GetWorkerTaskManager(KWorkerTaskManager::WorkerType_Exit).Initialize(KWorkerTaskManager::ExitWorkerPriority);
|
||||||
|
|
||||||
/* Setup so that we may sleep later, and reserve memory for secure applets. */
|
/* Setup so that we may sleep later, and reserve memory for secure applets. */
|
||||||
KSystemControl::InitializePhase2();
|
KSystemControl::InitializePhase2();
|
||||||
|
|
Loading…
Reference in a new issue