mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:57:47 +00:00
Kernel: Remove unnecessary locking in RangeAllocator::contains()
The total range managed by a RangeAllocator doesn't change, so there's no need to take a spinlock while comparing against it.
This commit is contained in:
parent
d4c73daacb
commit
7ff14fecba
1 changed files with 1 additions and 5 deletions
|
@ -28,11 +28,7 @@ public:
|
||||||
|
|
||||||
void dump() const;
|
void dump() const;
|
||||||
|
|
||||||
bool contains(Range const& range) const
|
bool contains(Range const& range) const { return m_total_range.contains(range); }
|
||||||
{
|
|
||||||
ScopedSpinLock lock(m_lock);
|
|
||||||
return m_total_range.contains(range);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void carve_at_index(int, Range const&);
|
void carve_at_index(int, Range const&);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue