core: hle: kernel: Instantiate a kernel instance of KWorkerTaskManager.
This commit is contained in:
parent
bf32fcc817
commit
c905044e1b
2 changed files with 18 additions and 0 deletions
|
@ -37,6 +37,7 @@
|
||||||
#include "core/hle/kernel/k_shared_memory.h"
|
#include "core/hle/kernel/k_shared_memory.h"
|
||||||
#include "core/hle/kernel/k_slab_heap.h"
|
#include "core/hle/kernel/k_slab_heap.h"
|
||||||
#include "core/hle/kernel/k_thread.h"
|
#include "core/hle/kernel/k_thread.h"
|
||||||
|
#include "core/hle/kernel/k_worker_task_manager.h"
|
||||||
#include "core/hle/kernel/kernel.h"
|
#include "core/hle/kernel/kernel.h"
|
||||||
#include "core/hle/kernel/physical_core.h"
|
#include "core/hle/kernel/physical_core.h"
|
||||||
#include "core/hle/kernel/service_thread.h"
|
#include "core/hle/kernel/service_thread.h"
|
||||||
|
@ -798,6 +799,8 @@ struct KernelCore::Impl {
|
||||||
|
|
||||||
std::array<u64, Core::Hardware::NUM_CPU_CORES> svc_ticks{};
|
std::array<u64, Core::Hardware::NUM_CPU_CORES> svc_ticks{};
|
||||||
|
|
||||||
|
KWorkerTaskManager worker_task_manager;
|
||||||
|
|
||||||
// System context
|
// System context
|
||||||
Core::System& system;
|
Core::System& system;
|
||||||
};
|
};
|
||||||
|
@ -1138,6 +1141,14 @@ const Init::KSlabResourceCounts& KernelCore::SlabResourceCounts() const {
|
||||||
return impl->slab_resource_counts;
|
return impl->slab_resource_counts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KWorkerTaskManager& KernelCore::WorkerTaskManager() {
|
||||||
|
return impl->worker_task_manager;
|
||||||
|
}
|
||||||
|
|
||||||
|
const KWorkerTaskManager& KernelCore::WorkerTaskManager() const {
|
||||||
|
return impl->worker_task_manager;
|
||||||
|
}
|
||||||
|
|
||||||
bool KernelCore::IsPhantomModeForSingleCore() const {
|
bool KernelCore::IsPhantomModeForSingleCore() const {
|
||||||
return impl->IsPhantomModeForSingleCore();
|
return impl->IsPhantomModeForSingleCore();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ class KSharedMemory;
|
||||||
class KSharedMemoryInfo;
|
class KSharedMemoryInfo;
|
||||||
class KThread;
|
class KThread;
|
||||||
class KTransferMemory;
|
class KTransferMemory;
|
||||||
|
class KWorkerTaskManager;
|
||||||
class KWritableEvent;
|
class KWritableEvent;
|
||||||
class KCodeMemory;
|
class KCodeMemory;
|
||||||
class PhysicalCore;
|
class PhysicalCore;
|
||||||
|
@ -343,6 +344,12 @@ public:
|
||||||
/// Gets the current slab resource counts.
|
/// Gets the current slab resource counts.
|
||||||
const Init::KSlabResourceCounts& SlabResourceCounts() const;
|
const Init::KSlabResourceCounts& SlabResourceCounts() const;
|
||||||
|
|
||||||
|
/// Gets the current worker task manager, used for dispatching KThread/KProcess tasks.
|
||||||
|
KWorkerTaskManager& WorkerTaskManager();
|
||||||
|
|
||||||
|
/// Gets the current worker task manager, used for dispatching KThread/KProcess tasks.
|
||||||
|
const KWorkerTaskManager& WorkerTaskManager() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class KProcess;
|
friend class KProcess;
|
||||||
friend class KThread;
|
friend class KThread;
|
||||||
|
|
Loading…
Reference in a new issue