summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-28 18:30:33 +0200
committerLioncash <mathew1800@gmail.com>2018-08-29 04:31:51 +0200
commit0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5 (patch)
tree2d7bb143d490c3984bff6deda426b818bf27d552 /src/core/core.cpp
parentMerge pull request #1193 from lioncash/priv (diff)
downloadyuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.gz
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.bz2
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.lz
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.xz
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.zst
yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.zip
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 07da4c493..2293669e5 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -171,6 +171,14 @@ const std::shared_ptr<Kernel::Scheduler>& System::Scheduler(size_t core_index) {
return cpu_cores[core_index]->Scheduler();
}
+Kernel::KernelCore& System::Kernel() {
+ return kernel;
+}
+
+const Kernel::KernelCore& System::Kernel() const {
+ return kernel;
+}
+
ARM_Interface& System::ArmInterface(size_t core_index) {
ASSERT(core_index < NUM_CPU_CORES);
return cpu_cores[core_index]->ArmInterface();
@@ -185,12 +193,13 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) {
LOG_DEBUG(HW_Memory, "initialized OK");
CoreTiming::Init();
+ kernel.Initialize();
// Create a default fs if one doesn't already exist.
if (virtual_filesystem == nullptr)
virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>();
- current_process = Kernel::Process::Create("main");
+ current_process = Kernel::Process::Create(kernel, "main");
cpu_barrier = std::make_shared<CpuBarrier>();
cpu_exclusive_monitor = Cpu::MakeExclusiveMonitor(cpu_cores.size());
@@ -201,7 +210,6 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) {
telemetry_session = std::make_unique<Core::TelemetrySession>();
service_manager = std::make_shared<Service::SM::ServiceManager>();
- Kernel::Init();
Service::Init(service_manager, virtual_filesystem);
GDBStub::Init();
@@ -246,7 +254,6 @@ void System::Shutdown() {
renderer.reset();
GDBStub::Shutdown();
Service::Shutdown();
- Kernel::Shutdown();
service_manager.reset();
telemetry_session.reset();
gpu_core.reset();
@@ -265,7 +272,8 @@ void System::Shutdown() {
}
cpu_barrier.reset();
- // Close core timing
+ // Shutdown kernel and core timing
+ kernel.Shutdown();
CoreTiming::Shutdown();
// Close app loader