diff options
author | merry <[email protected]> | 2023-05-17 15:34:19 +0100 |
---|---|---|
committer | merry <[email protected]> | 2023-05-17 15:34:19 +0100 |
commit | f7296572ba47bca9d90ff69db8e5cccb72cffd47 (patch) | |
tree | 5403ff75e096407d1b9e237e4ae5d42469c801d1 | |
parent | 7da378033a7764f955516f75194856d87bbcd7a5 (diff) | |
download | dynarmic-f7296572ba47bca9d90ff69db8e5cccb72cffd47.tar.gz dynarmic-f7296572ba47bca9d90ff69db8e5cccb72cffd47.zip |
spin_lock: Unlocked at initilization time
-rw-r--r-- | src/dynarmic/backend/arm64/exclusive_monitor.cpp | 4 | ||||
-rw-r--r-- | src/dynarmic/backend/x64/exclusive_monitor.cpp | 4 | ||||
-rw-r--r-- | src/dynarmic/common/spin_lock.h | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/src/dynarmic/backend/arm64/exclusive_monitor.cpp b/src/dynarmic/backend/arm64/exclusive_monitor.cpp index cd28598a..d57a29cd 100644 --- a/src/dynarmic/backend/arm64/exclusive_monitor.cpp +++ b/src/dynarmic/backend/arm64/exclusive_monitor.cpp @@ -12,9 +12,7 @@ namespace Dynarmic { ExclusiveMonitor::ExclusiveMonitor(size_t processor_count) - : exclusive_addresses(processor_count, INVALID_EXCLUSIVE_ADDRESS), exclusive_values(processor_count) { - Unlock(); -} + : exclusive_addresses(processor_count, INVALID_EXCLUSIVE_ADDRESS), exclusive_values(processor_count) {} size_t ExclusiveMonitor::GetProcessorCount() const { return exclusive_addresses.size(); diff --git a/src/dynarmic/backend/x64/exclusive_monitor.cpp b/src/dynarmic/backend/x64/exclusive_monitor.cpp index 68ce912c..984b67bb 100644 --- a/src/dynarmic/backend/x64/exclusive_monitor.cpp +++ b/src/dynarmic/backend/x64/exclusive_monitor.cpp @@ -12,9 +12,7 @@ namespace Dynarmic { ExclusiveMonitor::ExclusiveMonitor(size_t processor_count) - : exclusive_addresses(processor_count, INVALID_EXCLUSIVE_ADDRESS), exclusive_values(processor_count) { - Unlock(); -} + : exclusive_addresses(processor_count, INVALID_EXCLUSIVE_ADDRESS), exclusive_values(processor_count) {} size_t ExclusiveMonitor::GetProcessorCount() const { return exclusive_addresses.size(); diff --git a/src/dynarmic/common/spin_lock.h b/src/dynarmic/common/spin_lock.h index a6ea9b68..f653704d 100644 --- a/src/dynarmic/common/spin_lock.h +++ b/src/dynarmic/common/spin_lock.h @@ -11,7 +11,7 @@ struct SpinLock { void Lock(); void Unlock(); - volatile int storage; + volatile int storage = 0; }; } // namespace Dynarmic |