فهرست منبع

scheduler: Cleanup based on PR feedback.

bunnei 8 سال پیش
والد
کامیت
8db80d8389
3فایلهای تغییر یافته به همراه4 افزوده شده و 5 حذف شده
  1. 1 1
      src/core/core.cpp
  2. 1 1
      src/core/hle/kernel/scheduler.cpp
  3. 2 3
      src/core/hle/kernel/scheduler.h

+ 1 - 1
src/core/core.cpp

@@ -154,7 +154,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
         break;
         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>();
     gpu_core = std::make_unique<Tegra::GPU>();
 
 
     telemetry_session = std::make_unique<Core::TelemetrySession>();
     telemetry_session = std::make_unique<Core::TelemetrySession>();

+ 1 - 1
src/core/hle/kernel/scheduler.cpp

@@ -8,7 +8,7 @@
 
 
 namespace Kernel {
 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() {
 Scheduler::~Scheduler() {
     for (auto& thread : thread_list) {
     for (auto& thread : thread_list) {

+ 2 - 3
src/core/hle/kernel/scheduler.h

@@ -4,7 +4,6 @@
 
 
 #pragma once
 #pragma once
 
 
-#include <memory>
 #include <vector>
 #include <vector>
 #include "common/common_types.h"
 #include "common/common_types.h"
 #include "common/thread_queue_list.h"
 #include "common/thread_queue_list.h"
@@ -15,7 +14,7 @@ namespace Kernel {
 
 
 class Scheduler final {
 class Scheduler final {
 public:
 public:
-    Scheduler(std::shared_ptr<ARM_Interface> cpu_core);
+    explicit Scheduler(ARM_Interface* cpu_core);
     ~Scheduler();
     ~Scheduler();
 
 
     /// Returns whether there are any threads that are ready to run.
     /// Returns whether there are any threads that are ready to run.
@@ -68,7 +67,7 @@ private:
 
 
     SharedPtr<Thread> current_thread = nullptr;
     SharedPtr<Thread> current_thread = nullptr;
 
 
-    std::shared_ptr<ARM_Interface> cpu_core;
+    ARM_Interface* cpu_core;
 };
 };
 
 
 } // namespace Kernel
 } // namespace Kernel