mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
SPU: Power consumption reduction when using SPU inaccurate reservations
This commit is contained in:
parent
92514e33bb
commit
cfdc852f03
3 changed files with 55 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/system_config.h"
|
||||
#include "Emu/Memory/vm_locking.h"
|
||||
#include "Emu/Memory/vm_reservation.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/GDB.h"
|
||||
#include "Emu/Cell/PPUThread.h"
|
||||
|
@ -892,6 +893,14 @@ cpu_thread& cpu_thread::operator=(thread_state)
|
|||
if (old & cpu_flag::wait && old.none_of(cpu_flag::again + cpu_flag::exit))
|
||||
{
|
||||
state.notify_one(cpu_flag::exit);
|
||||
|
||||
if (auto thread = try_get<spu_thread>())
|
||||
{
|
||||
if (u32 resv = atomic_storage<u32>::load(thread->raddr))
|
||||
{
|
||||
vm::reservation_notifier(resv).notify_one();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue