mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 01:08:39 +12:00
fix thread exit crash
This commit is contained in:
parent
64bfae6648
commit
8a3835bcef
3 changed files with 8 additions and 3 deletions
|
@ -351,6 +351,11 @@ void CPUThread::Task()
|
||||||
{
|
{
|
||||||
ConLog.Error("Exception: %s", e);
|
ConLog.Error("Exception: %s", e);
|
||||||
}
|
}
|
||||||
|
catch(int exitcode)
|
||||||
|
{
|
||||||
|
ConLog.Success("Exit Code: %d", exitcode);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//ConLog.Write("%s leave", CPUThread::GetFName());
|
//ConLog.Write("%s leave", CPUThread::GetFName());
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ extern int sys_mutex_trylock(u32 mutex_id);
|
||||||
extern int sys_mutex_unlock(u32 mutex_id);
|
extern int sys_mutex_unlock(u32 mutex_id);
|
||||||
|
|
||||||
//ppu_thread
|
//ppu_thread
|
||||||
extern int sys_ppu_thread_exit(int errorcode);
|
extern void sys_ppu_thread_exit(int errorcode);
|
||||||
extern int sys_ppu_thread_yield();
|
extern int sys_ppu_thread_yield();
|
||||||
extern int sys_ppu_thread_join(u32 thread_id, u32 vptr_addr);
|
extern int sys_ppu_thread_join(u32 thread_id, u32 vptr_addr);
|
||||||
extern int sys_ppu_thread_detach(u32 thread_id);
|
extern int sys_ppu_thread_detach(u32 thread_id);
|
||||||
|
|
|
@ -10,7 +10,7 @@ enum
|
||||||
SYS_PPU_THREAD_DONE_INIT,
|
SYS_PPU_THREAD_DONE_INIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
int sys_ppu_thread_exit(int errorcode)
|
void sys_ppu_thread_exit(int errorcode)
|
||||||
{
|
{
|
||||||
if(errorcode == 0)
|
if(errorcode == 0)
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ int sys_ppu_thread_exit(int errorcode)
|
||||||
thr.SetExitStatus(errorcode);
|
thr.SetExitStatus(errorcode);
|
||||||
Emu.GetCPU().RemoveThread(thr.GetId());
|
Emu.GetCPU().RemoveThread(thr.GetId());
|
||||||
|
|
||||||
return CELL_OK;
|
throw errorcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_ppu_thread_yield()
|
int sys_ppu_thread_yield()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue