summaryrefslogtreecommitdiffstats
path: root/src/core/core_cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core_cpu.h')
-rw-r--r--src/core/core_cpu.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/core/core_cpu.h b/src/core/core_cpu.h
new file mode 100644
index 000000000..312db1655
--- /dev/null
+++ b/src/core/core_cpu.h
@@ -0,0 +1,46 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <memory>
+#include <string>
+#include "common/common_types.h"
+
+class ARM_Interface;
+
+namespace Kernel {
+class Scheduler;
+}
+
+namespace Core {
+
+class Cpu {
+public:
+ Cpu();
+
+ void RunLoop(bool tight_loop = true);
+
+ void SingleStep();
+
+ void PrepareReschedule();
+
+ ARM_Interface& CPU() {
+ return *arm_interface;
+ }
+
+ Kernel::Scheduler& Scheduler() {
+ return *scheduler;
+ }
+
+private:
+ void Reschedule();
+
+ std::shared_ptr<ARM_Interface> arm_interface;
+ std::unique_ptr<Kernel::Scheduler> scheduler;
+
+ bool reschedule_pending{};
+};
+
+} // namespace Core