diff --git a/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp b/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp index c629099a6f..bce53764d2 100644 --- a/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_event_flag.cpp @@ -377,8 +377,8 @@ error_code sys_event_flag_cancel(ppu_thread& ppu, u32 id, vm::ptr num) // Set count value = ::size32(flag->sq); - // Signal all threads to return CELL_ECANCELED - while (auto thread = flag->schedule(flag->sq, flag->protocol)) + // Signal all threads to return CELL_ECANCELED (protocol does not matter) + for (auto thread : ::as_rvalue(std::move(flag->sq))) { auto& ppu = static_cast(*thread); diff --git a/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp b/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp index 2882e626d6..1c613b68d8 100644 --- a/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp @@ -231,7 +231,7 @@ error_code _sys_lwcond_signal_all(ppu_thread& ppu, u32 lwcond_id, u32 lwmutex_id u32 result = 0; - while (const auto cpu = cond.schedule(cond.sq, cond.protocol)) + for (const auto cpu : ::as_rvalue(std::move(cond.sq))) { cond.waiters--; diff --git a/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp b/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp index ddf49d2a7d..bb1f8f2b19 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rwlock.cpp @@ -363,7 +363,7 @@ error_code sys_rwlock_wlock(ppu_thread& ppu, u32 rw_lock_id, u64 timeout) }); // Protocol doesn't matter here since they are all enqueued anyways - while (auto cpu = rwlock->schedule(rwlock->rq, SYS_SYNC_FIFO)) + for (auto cpu : ::as_rvalue(std::move(rwlock->rq))) { rwlock->append(cpu); } @@ -456,7 +456,7 @@ error_code sys_rwlock_wunlock(ppu_thread& ppu, u32 rw_lock_id) } else if (auto readers = rwlock->rq.size()) { - while (auto cpu = rwlock->schedule(rwlock->rq, SYS_SYNC_FIFO)) + for (auto cpu : ::as_rvalue(std::move(rwlock->rq))) { rwlock->append(cpu); }