mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Make ESTAT consistent in sys_spu_thread_group_terminate
This commit is contained in:
parent
9506676223
commit
fe7933b0d2
2 changed files with 6 additions and 1 deletions
|
@ -668,6 +668,7 @@ error_code sys_spu_thread_group_start(ppu_thread& ppu, u32 id)
|
|||
|
||||
group->join_state = 0;
|
||||
group->running = max_threads;
|
||||
group->set_terminate = false;
|
||||
|
||||
for (auto& thread : group->threads)
|
||||
{
|
||||
|
@ -859,11 +860,14 @@ error_code sys_spu_thread_group_terminate(ppu_thread& ppu, u32 id, s32 value)
|
|||
|
||||
if (group->run_state <= SPU_THREAD_GROUP_STATUS_INITIALIZED ||
|
||||
group->run_state == SPU_THREAD_GROUP_STATUS_WAITING ||
|
||||
group->run_state == SPU_THREAD_GROUP_STATUS_WAITING_AND_SUSPENDED)
|
||||
group->run_state == SPU_THREAD_GROUP_STATUS_WAITING_AND_SUSPENDED ||
|
||||
group->set_terminate)
|
||||
{
|
||||
return CELL_ESTAT;
|
||||
}
|
||||
|
||||
group->set_terminate = true;
|
||||
|
||||
for (auto& thread : group->threads)
|
||||
{
|
||||
if (thread)
|
||||
|
|
|
@ -270,6 +270,7 @@ struct lv2_spu_group
|
|||
cond_variable cond; // used to signal waiting PPU thread
|
||||
atomic_t<u64> stop_count;
|
||||
class ppu_thread* waiter = nullptr;
|
||||
bool set_terminate = false;
|
||||
|
||||
std::array<std::shared_ptr<named_thread<spu_thread>>, 8> threads; // SPU Threads
|
||||
std::array<s8, 256> threads_map; // SPU Threads map based number
|
||||
|
|
Loading…
Add table
Reference in a new issue