mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Fix sys_spu_thread_group_resume
Do not remove suspend flag when SPU group state is not SPU_THREAD_GROUP_STATUS_RUNNING after operation!
This commit is contained in:
parent
bf61c826d5
commit
91737b11fe
2 changed files with 11 additions and 1 deletions
|
@ -4278,6 +4278,9 @@ extern void resume_spu_thread_group_from_waiting(spu_thread& spu)
|
|||
else if (group->run_state == SPU_THREAD_GROUP_STATUS_WAITING_AND_SUSPENDED)
|
||||
{
|
||||
group->run_state = SPU_THREAD_GROUP_STATUS_SUSPENDED;
|
||||
spu.state += cpu_flag::signal;
|
||||
spu.state.notify_one(cpu_flag::signal);
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto& thread : group->threads)
|
||||
|
|
|
@ -958,6 +958,8 @@ error_code sys_spu_thread_group_resume(ppu_thread& ppu, u32 id)
|
|||
else if (state == SPU_THREAD_GROUP_STATUS_WAITING_AND_SUSPENDED)
|
||||
{
|
||||
state = SPU_THREAD_GROUP_STATUS_WAITING;
|
||||
error = CellError{};
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -971,7 +973,12 @@ error_code sys_spu_thread_group_resume(ppu_thread& ppu, u32 id)
|
|||
|
||||
if (error != CELL_CANCEL + 0u)
|
||||
{
|
||||
return error;
|
||||
if (error)
|
||||
{
|
||||
return error;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
for (auto& thread : group->threads)
|
||||
|
|
Loading…
Add table
Reference in a new issue