From 04e0f8776c26930d7dc8015e53914b11bf1929c1 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Thu, 27 Feb 2020 19:12:41 -0400 Subject: General: Add better safety for JIT use. --- src/core/arm/arm_interface.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 87a1c29cc..be9f3703a 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -6,6 +6,7 @@ #include #include +#include #include "common/common_types.h" namespace Common { @@ -164,6 +165,14 @@ public: std::string name; }; + void Lock() { + guard.lock(); + } + + void Unlock() { + guard.unlock(); + } + std::vector GetBacktrace() const; /// fp (= r29) points to the last frame record. @@ -178,6 +187,7 @@ protected: /// System context that this ARM interface is running under. System& system; CPUInterruptHandler& interrupt_handler; + std::mutex guard; }; } // namespace Core -- cgit v1.2.3