mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
rsx/overlays: Use lf_queue for a lock-free stack implementation
This commit is contained in:
parent
388ca1c645
commit
7db6594358
4 changed files with 34 additions and 50 deletions
|
@ -359,6 +359,14 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
// Withdraw the list in reverse order (LIFO/FILO)
|
||||
lf_queue_slice<T> pop_all_reversed()
|
||||
{
|
||||
lf_queue_slice<T> result;
|
||||
result.m_head = m_head.exchange(nullptr);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Apply func(data) to each element, return the total length
|
||||
template <typename F>
|
||||
usz apply(F func)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue