Commit 34223445 authored by Xavier Thompson's avatar Xavier Thompson

gc.hpp: Optimise list traversal

parent 5c31b955
......@@ -109,7 +109,8 @@ namespace typon::fdt::lock_free
void reclaim(u64 oldest) noexcept
{
while (auto tail = _tail.load())
auto tail = _tail.load();
while (tail)
{
if (tail->_stamp >= oldest)
{
......@@ -123,6 +124,7 @@ namespace typon::fdt::lock_free
if (_tail.compare_exchange_strong(tail, next))
{
delete tail;
tail = next;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment