spin_lock: Unlocked at initilization time
This commit is contained in:
parent
7da378033a
commit
f7296572ba
3 changed files with 3 additions and 7 deletions
|
@ -12,9 +12,7 @@
|
||||||
namespace Dynarmic {
|
namespace Dynarmic {
|
||||||
|
|
||||||
ExclusiveMonitor::ExclusiveMonitor(size_t processor_count)
|
ExclusiveMonitor::ExclusiveMonitor(size_t processor_count)
|
||||||
: exclusive_addresses(processor_count, INVALID_EXCLUSIVE_ADDRESS), exclusive_values(processor_count) {
|
: exclusive_addresses(processor_count, INVALID_EXCLUSIVE_ADDRESS), exclusive_values(processor_count) {}
|
||||||
Unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t ExclusiveMonitor::GetProcessorCount() const {
|
size_t ExclusiveMonitor::GetProcessorCount() const {
|
||||||
return exclusive_addresses.size();
|
return exclusive_addresses.size();
|
||||||
|
|
|
@ -12,9 +12,7 @@
|
||||||
namespace Dynarmic {
|
namespace Dynarmic {
|
||||||
|
|
||||||
ExclusiveMonitor::ExclusiveMonitor(size_t processor_count)
|
ExclusiveMonitor::ExclusiveMonitor(size_t processor_count)
|
||||||
: exclusive_addresses(processor_count, INVALID_EXCLUSIVE_ADDRESS), exclusive_values(processor_count) {
|
: exclusive_addresses(processor_count, INVALID_EXCLUSIVE_ADDRESS), exclusive_values(processor_count) {}
|
||||||
Unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t ExclusiveMonitor::GetProcessorCount() const {
|
size_t ExclusiveMonitor::GetProcessorCount() const {
|
||||||
return exclusive_addresses.size();
|
return exclusive_addresses.size();
|
||||||
|
|
|
@ -11,7 +11,7 @@ struct SpinLock {
|
||||||
void Lock();
|
void Lock();
|
||||||
void Unlock();
|
void Unlock();
|
||||||
|
|
||||||
volatile int storage;
|
volatile int storage = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Dynarmic
|
} // namespace Dynarmic
|
||||||
|
|
Loading…
Reference in a new issue