mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-08 09:09:46 +00:00
vm: optimize range lock slot allocations
Doesn't seem to need a barrier.
This commit is contained in:
parent
cb0431d960
commit
7dd85b207f
1 changed files with 0 additions and 4 deletions
|
@ -149,8 +149,6 @@ namespace vm
|
||||||
fmt::throw_exception("Out of range lock bits");
|
fmt::throw_exception("Out of range lock bits");
|
||||||
}
|
}
|
||||||
|
|
||||||
g_mutex.lock_unlock();
|
|
||||||
|
|
||||||
return &g_range_lock_set[std::countr_one(bits)];
|
return &g_range_lock_set[std::countr_one(bits)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,8 +195,6 @@ namespace vm
|
||||||
|
|
||||||
range_lock->release(0);
|
range_lock->release(0);
|
||||||
|
|
||||||
std::shared_lock lock(g_mutex);
|
|
||||||
|
|
||||||
// Use ptr difference to determine location
|
// Use ptr difference to determine location
|
||||||
const auto diff = range_lock - g_range_lock_set;
|
const auto diff = range_lock - g_range_lock_set;
|
||||||
g_range_lock_bits &= ~(1ull << diff);
|
g_range_lock_bits &= ~(1ull << diff);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue