vm: optimize range lock slot allocations
Doesn't seem to need a barrier.
This commit is contained in:
@@ -149,8 +149,6 @@ namespace vm
|
||||
fmt::throw_exception("Out of range lock bits");
|
||||
}
|
||||
|
||||
g_mutex.lock_unlock();
|
||||
|
||||
return &g_range_lock_set[std::countr_one(bits)];
|
||||
}
|
||||
|
||||
@@ -197,8 +195,6 @@ namespace vm
|
||||
|
||||
range_lock->release(0);
|
||||
|
||||
std::shared_lock lock(g_mutex);
|
||||
|
||||
// Use ptr difference to determine location
|
||||
const auto diff = range_lock - g_range_lock_set;
|
||||
g_range_lock_bits &= ~(1ull << diff);
|
||||
|
||||
Reference in New Issue
Block a user