mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
Add EFAULT checks to spu_thread_group_join, ppu_thread_join
Order of checks is based on firmware
This commit is contained in:
parent
0861226271
commit
84d42ecb65
3 changed files with 18 additions and 13 deletions
|
|
@ -120,19 +120,21 @@ error_code sys_ppu_thread_join(ppu_thread& ppu, u32 thread_id, vm::ptr<u64> vptr
|
|||
// Wait for cleanup
|
||||
(*thread.ptr)();
|
||||
|
||||
// Get the exit status from the register
|
||||
if (vptr)
|
||||
if (ppu.test_stopped())
|
||||
{
|
||||
if (ppu.test_stopped())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
*vptr = thread->gpr[3];
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
idm::remove<named_thread<ppu_thread>>(thread->id);
|
||||
|
||||
if (!vptr)
|
||||
{
|
||||
return CELL_EFAULT;
|
||||
}
|
||||
|
||||
// Get the exit status from the register
|
||||
*vptr = thread->gpr[3];
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue