mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
std::shared_ptr in IdManager
This commit is contained in:
parent
b2de24db73
commit
d8239a39c9
47 changed files with 654 additions and 622 deletions
|
|
@ -121,7 +121,7 @@ s32 sceKernelStartThread(s32 threadId, u32 argSize, vm::psv::ptr<const void> pAr
|
|||
{
|
||||
sceLibKernel.Error("sceKernelStartThread(threadId=%d, argSize=%d, pArgBlock_addr=0x%x)", threadId, argSize, pArgBlock.addr());
|
||||
|
||||
CPUThread* t = Emu.GetCPU().GetThread(threadId);
|
||||
std::shared_ptr<CPUThread> t = Emu.GetCPU().GetThread(threadId);
|
||||
|
||||
if (!t || t->GetType() != CPU_THREAD_ARMv7)
|
||||
{
|
||||
|
|
@ -129,12 +129,12 @@ s32 sceKernelStartThread(s32 threadId, u32 argSize, vm::psv::ptr<const void> pAr
|
|||
}
|
||||
|
||||
// push arg block onto the stack
|
||||
u32 pos = (static_cast<ARMv7Thread*>(t)->SP -= argSize);
|
||||
u32 pos = (static_cast<ARMv7Thread*>(t.get())->SP -= argSize);
|
||||
memcpy(vm::get_ptr<void>(pos), pArgBlock.get_ptr(), argSize);
|
||||
|
||||
// set SceKernelThreadEntry function arguments
|
||||
static_cast<ARMv7Thread*>(t)->write_gpr(0, argSize);
|
||||
static_cast<ARMv7Thread*>(t)->write_gpr(1, pos);
|
||||
static_cast<ARMv7Thread*>(t.get())->write_gpr(0, argSize);
|
||||
static_cast<ARMv7Thread*>(t.get())->write_gpr(1, pos);
|
||||
|
||||
t->Exec();
|
||||
return SCE_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue