From 49dc2ce8ac4fc37a008fa28e0771c8c74c576b05 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 20 May 2014 18:50:16 -0400 Subject: ARM_Interface: added SaveContext and LoadContext functions for HLE thread switching --- src/core/arm/arm_interface.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/core/arm/arm_interface.h') diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 5c382ebb..52bc8211 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -7,6 +7,8 @@ #include "common/common.h" #include "common/common_types.h" +#include "core/hle/svc.h" + /// Generic ARM11 CPU interface class ARM_Interface : NonCopyable { public: @@ -75,6 +77,18 @@ public: */ virtual u64 GetTicks() const = 0; + /** + * Saves the current CPU context + * @param ctx Thread context to save + */ + virtual void SaveContext(ThreadContext& ctx) = 0; + + /** + * Loads a CPU context + * @param ctx Thread context to load + */ + virtual void LoadContext(const ThreadContext& ctx) = 0; + /// Getter for m_num_instructions u64 GetNumInstructions() { return m_num_instructions; @@ -90,6 +104,6 @@ protected: private: - u64 m_num_instructions; ///< Number of instructions executed + u64 m_num_instructions; ///< Number of instructions executed }; -- cgit v1.2.3