summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-02-19 22:46:42 +0100
committerbunnei <bunneidev@gmail.com>2018-02-19 22:46:42 +0100
commit8db80d8389689af5f1b8bf7f8a01f98b9cea4c09 (patch)
tree72bcac878efe95f5e640e833fd2bad2b7e62e3ce
parentkernel: Use Scheduler class for threading. (diff)
downloadyuzu-8db80d8389689af5f1b8bf7f8a01f98b9cea4c09.tar
yuzu-8db80d8389689af5f1b8bf7f8a01f98b9cea4c09.tar.gz
yuzu-8db80d8389689af5f1b8bf7f8a01f98b9cea4c09.tar.bz2
yuzu-8db80d8389689af5f1b8bf7f8a01f98b9cea4c09.tar.lz
yuzu-8db80d8389689af5f1b8bf7f8a01f98b9cea4c09.tar.xz
yuzu-8db80d8389689af5f1b8bf7f8a01f98b9cea4c09.tar.zst
yuzu-8db80d8389689af5f1b8bf7f8a01f98b9cea4c09.zip
Diffstat (limited to '')
-rw-r--r--src/core/core.cpp2
-rw-r--r--src/core/hle/kernel/scheduler.cpp2
-rw-r--r--src/core/hle/kernel/scheduler.h5
3 files changed, 4 insertions, 5 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index cef697dfe..8c5dd3761 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -154,7 +154,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
break;
}
- scheduler = std::make_unique<Kernel::Scheduler>(cpu_core);
+ scheduler = std::make_unique<Kernel::Scheduler>(cpu_core.get());
gpu_core = std::make_unique<Tegra::GPU>();
telemetry_session = std::make_unique<Core::TelemetrySession>();
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp
index 2fe0d5a38..235068b22 100644
--- a/src/core/hle/kernel/scheduler.cpp
+++ b/src/core/hle/kernel/scheduler.cpp
@@ -8,7 +8,7 @@
namespace Kernel {
-Scheduler::Scheduler(std::shared_ptr<ARM_Interface> cpu_core) : cpu_core(cpu_core) {}
+Scheduler::Scheduler(ARM_Interface* cpu_core) : cpu_core(cpu_core) {}
Scheduler::~Scheduler() {
for (auto& thread : thread_list) {
diff --git a/src/core/hle/kernel/scheduler.h b/src/core/hle/kernel/scheduler.h
index 72e658ec6..27d0247d6 100644
--- a/src/core/hle/kernel/scheduler.h
+++ b/src/core/hle/kernel/scheduler.h
@@ -4,7 +4,6 @@
#pragma once
-#include <memory>
#include <vector>
#include "common/common_types.h"
#include "common/thread_queue_list.h"
@@ -15,7 +14,7 @@ namespace Kernel {
class Scheduler final {
public:
- Scheduler(std::shared_ptr<ARM_Interface> cpu_core);
+ explicit Scheduler(ARM_Interface* cpu_core);
~Scheduler();
/// Returns whether there are any threads that are ready to run.
@@ -68,7 +67,7 @@ private:
SharedPtr<Thread> current_thread = nullptr;
- std::shared_ptr<ARM_Interface> cpu_core;
+ ARM_Interface* cpu_core;
};
} // namespace Kernel