diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-27 19:12:41 -0400 |
|---|---|---|
| committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-27 11:35:20 -0400 |
| commit | 04e0f8776c26930d7dc8015e53914b11bf1929c1 (patch) | |
| tree | 4a8288d6bf8655a2ec0595fdc6d41a3037c5fcad /src/core/arm/arm_interface.h | |
| parent | bd36eaf15d88c3875aba7032fe5124fbb150bd5d (diff) | |
General: Add better safety for JIT use.
Diffstat (limited to 'src/core/arm/arm_interface.h')
| -rw-r--r-- | src/core/arm/arm_interface.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 <array> #include <vector> +#include <mutex> #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<BacktraceEntry> 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 |
