mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
Fix lf_queue regression
This commit is contained in:
parent
d34287b2cc
commit
39a0ff99b2
@ -342,15 +342,14 @@ public:
|
||||
void push(Args&&... args)
|
||||
{
|
||||
auto oldv = m_head.load();
|
||||
auto _old = load(oldv);
|
||||
auto item = new lf_queue_item<T>(_old, std::forward<Args>(args)...);
|
||||
auto item = new lf_queue_item<T>(load(oldv), std::forward<Args>(args)...);
|
||||
|
||||
while (!m_head.compare_exchange(oldv, reinterpret_cast<u64>(item) << 16))
|
||||
{
|
||||
item->m_link = _old;
|
||||
item->m_link = load(oldv);
|
||||
}
|
||||
|
||||
if (!_old)
|
||||
if (!oldv)
|
||||
{
|
||||
// Notify only if queue was empty
|
||||
utils::bless<atomic_t<u32>>(&m_head)[1].notify_one();
|
||||
|
Loading…
Reference in New Issue
Block a user