summaryrefslogtreecommitdiffstats
path: root/src/core/core_cpu.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-05-02 04:21:38 +0200
committerbunnei <bunneidev@gmail.com>2018-05-11 01:34:46 +0200
commit559024593086d04e24a99a9f77490a3f97cf952d (patch)
tree0b9163a33ae973bd69cb3883bea1e91a3581f527 /src/core/core_cpu.h
parentStubs for QLaunch (#428) (diff)
downloadyuzu-559024593086d04e24a99a9f77490a3f97cf952d.tar
yuzu-559024593086d04e24a99a9f77490a3f97cf952d.tar.gz
yuzu-559024593086d04e24a99a9f77490a3f97cf952d.tar.bz2
yuzu-559024593086d04e24a99a9f77490a3f97cf952d.tar.lz
yuzu-559024593086d04e24a99a9f77490a3f97cf952d.tar.xz
yuzu-559024593086d04e24a99a9f77490a3f97cf952d.tar.zst
yuzu-559024593086d04e24a99a9f77490a3f97cf952d.zip
Diffstat (limited to '')
-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