mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
SPU fixes, various fixes
This commit is contained in:
parent
721ad404d2
commit
8f9e1100c8
33 changed files with 1021 additions and 871 deletions
|
@ -168,14 +168,28 @@ void CPUThread::Step()
|
|||
|
||||
void CPUThread::Sleep()
|
||||
{
|
||||
m_state ^= CPU_STATE_SLEEP;
|
||||
m_state += CPU_STATE_MAX;
|
||||
m_state |= CPU_STATE_SLEEP;
|
||||
|
||||
cv.notify_one();
|
||||
}
|
||||
|
||||
void CPUThread::Awake()
|
||||
{
|
||||
m_state ^= CPU_STATE_SLEEP;
|
||||
// must be called after the corresponding Sleep() call
|
||||
|
||||
m_state.atomic_op([](u64& state)
|
||||
{
|
||||
if (state < CPU_STATE_MAX)
|
||||
{
|
||||
throw EXCEPTION("Sleep()/Awake() inconsistency");
|
||||
}
|
||||
|
||||
if ((state -= CPU_STATE_MAX) < CPU_STATE_MAX)
|
||||
{
|
||||
state &= ~CPU_STATE_SLEEP;
|
||||
}
|
||||
});
|
||||
|
||||
cv.notify_one();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue