mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 10:48:36 +12:00
sys_ppu_thread_create threadname workaround
This commit is contained in:
parent
52eaf10d93
commit
7fca980887
1 changed files with 15 additions and 4 deletions
|
@ -147,10 +147,21 @@ int sys_ppu_thread_restart(u32 thread_id)
|
||||||
|
|
||||||
int sys_ppu_thread_create(u32 thread_id_addr, u32 entry, u64 arg, int prio, u32 stacksize, u64 flags, u32 threadname_addr)
|
int sys_ppu_thread_create(u32 thread_id_addr, u32 entry, u64 arg, int prio, u32 stacksize, u64 flags, u32 threadname_addr)
|
||||||
{
|
{
|
||||||
sysPrxForUser->Log("sys_ppu_thread_create(thread_id_addr=0x%x, entry=0x%x, arg=0x%x, prio=%d, stacksize=0x%x, flags=0x%llx, threadname_addr=0x%x('%s'))",
|
std::string threadname = "";
|
||||||
thread_id_addr, entry, arg, prio, stacksize, flags, threadname_addr, Memory.ReadString(threadname_addr).c_str());
|
if (Memory.IsGoodAddr(threadname_addr))
|
||||||
|
{
|
||||||
|
threadname = Memory.ReadString(threadname_addr);
|
||||||
|
sysPrxForUser->Log("sys_ppu_thread_create(thread_id_addr=0x%x, entry=0x%x, arg=0x%x, prio=%d, stacksize=0x%x, flags=0x%llx, threadname_addr=0x%x('%s'))",
|
||||||
|
thread_id_addr, entry, arg, prio, stacksize, flags, threadname_addr, threadname.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sysPrxForUser->Log("sys_ppu_thread_create(thread_id_addr=0x%x, entry=0x%x, arg=0x%x, prio=%d, stacksize=0x%x, flags=0x%llx, threadname_addr=0x%x)",
|
||||||
|
thread_id_addr, entry, arg, prio, stacksize, flags, threadname_addr);
|
||||||
|
if (threadname_addr != 0) return CELL_EFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
if(!Memory.IsGoodAddr(entry) || !Memory.IsGoodAddr(thread_id_addr) || !Memory.IsGoodAddr(threadname_addr))
|
if(!Memory.IsGoodAddr(entry) || !Memory.IsGoodAddr(thread_id_addr))
|
||||||
{
|
{
|
||||||
return CELL_EFAULT;
|
return CELL_EFAULT;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +174,7 @@ int sys_ppu_thread_create(u32 thread_id_addr, u32 entry, u64 arg, int prio, u32
|
||||||
new_thread.SetPrio(prio);
|
new_thread.SetPrio(prio);
|
||||||
new_thread.SetStackSize(stacksize);
|
new_thread.SetStackSize(stacksize);
|
||||||
//new_thread.flags = flags;
|
//new_thread.flags = flags;
|
||||||
new_thread.SetName(Memory.ReadString(threadname_addr));
|
new_thread.SetName(threadname);
|
||||||
|
|
||||||
ConLog.Write("*** New PPU Thread [%s] (): id = %d", new_thread.GetName().c_str(), new_thread.GetId());
|
ConLog.Write("*** New PPU Thread [%s] (): id = %d", new_thread.GetName().c_str(), new_thread.GetId());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue