mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
RawSpu: Optimize START register/commands
START MFC proxy commands can be common even after their need, optimize their usage.
This commit is contained in:
parent
c70c08bb07
commit
af052b0627
1 changed files with 19 additions and 9 deletions
|
@ -6,6 +6,10 @@
|
|||
#include "Emu/Cell/RawSPUThread.h"
|
||||
|
||||
inline void try_start(spu_thread& spu)
|
||||
{
|
||||
bool notify = false;
|
||||
|
||||
if (~spu.status_npc.load().status & SPU_STATUS_RUNNING)
|
||||
{
|
||||
reader_lock lock(spu.run_ctrl_mtx);
|
||||
|
||||
|
@ -21,6 +25,12 @@ inline void try_start(spu_thread& spu)
|
|||
}).second)
|
||||
{
|
||||
spu.state -= cpu_flag::stop;
|
||||
notify = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (notify)
|
||||
{
|
||||
spu.state.notify_one();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue