summaryrefslogtreecommitdiff
path: root/src/core/arm/arm_interface.h
diff options
context:
space:
mode:
authorGravatar bunnei2014-05-20 18:50:16 -0400
committerGravatar bunnei2014-05-20 18:50:16 -0400
commit49dc2ce8ac4fc37a008fa28e0771c8c74c576b05 (patch)
tree1640b629267273cb6afe73e7923833072ad55d7d /src/core/arm/arm_interface.h
parentrenamed "syscall" module to "svc" (more accurate naming) (diff)
downloadyuzu-49dc2ce8ac4fc37a008fa28e0771c8c74c576b05.tar.gz
yuzu-49dc2ce8ac4fc37a008fa28e0771c8c74c576b05.tar.xz
yuzu-49dc2ce8ac4fc37a008fa28e0771c8c74c576b05.zip
ARM_Interface: added SaveContext and LoadContext functions for HLE thread switching
Diffstat (limited to 'src/core/arm/arm_interface.h')
-rw-r--r--src/core/arm/arm_interface.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index 5c382ebbd..52bc82115 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -7,6 +7,8 @@
7#include "common/common.h" 7#include "common/common.h"
8#include "common/common_types.h" 8#include "common/common_types.h"
9 9
10#include "core/hle/svc.h"
11
10/// Generic ARM11 CPU interface 12/// Generic ARM11 CPU interface
11class ARM_Interface : NonCopyable { 13class ARM_Interface : NonCopyable {
12public: 14public:
@@ -75,6 +77,18 @@ public:
75 */ 77 */
76 virtual u64 GetTicks() const = 0; 78 virtual u64 GetTicks() const = 0;
77 79
80 /**
81 * Saves the current CPU context
82 * @param ctx Thread context to save
83 */
84 virtual void SaveContext(ThreadContext& ctx) = 0;
85
86 /**
87 * Loads a CPU context
88 * @param ctx Thread context to load
89 */
90 virtual void LoadContext(const ThreadContext& ctx) = 0;
91
78 /// Getter for m_num_instructions 92 /// Getter for m_num_instructions
79 u64 GetNumInstructions() { 93 u64 GetNumInstructions() {
80 return m_num_instructions; 94 return m_num_instructions;
@@ -90,6 +104,6 @@ protected:
90 104
91private: 105private:
92 106
93 u64 m_num_instructions; ///< Number of instructions executed 107 u64 m_num_instructions; ///< Number of instructions executed
94 108
95}; 109};