mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 16:31:28 +12:00
Fix stacksize
This commit is contained in:
parent
948758f758
commit
e2d2c9d377
3 changed files with 20 additions and 11 deletions
|
@ -536,7 +536,7 @@ void GLVertexDecompilerThread::Task()
|
||||||
switch (d1.sca_opcode)
|
switch (d1.sca_opcode)
|
||||||
{
|
{
|
||||||
case 0x08: //BRA
|
case 0x08: //BRA
|
||||||
LOG_WARNING(RSX, "BRA found. Please report to RPCS3 team.");
|
LOG_ERROR(RSX, "BRA found. Please report to RPCS3 team.");
|
||||||
is_has_BRA = true;
|
is_has_BRA = true;
|
||||||
m_jump_lvls.clear();
|
m_jump_lvls.clear();
|
||||||
d3.HEX = m_data[++i];
|
d3.HEX = m_data[++i];
|
||||||
|
|
|
@ -61,7 +61,8 @@ s32 sys_ppu_thread_join(u64 thread_id, vm::ptr<u64> vptr)
|
||||||
sys_ppu_thread.Warning("sys_ppu_thread_join(thread_id=%lld, vptr_addr=0x%x)", thread_id, vptr.addr());
|
sys_ppu_thread.Warning("sys_ppu_thread_join(thread_id=%lld, vptr_addr=0x%x)", thread_id, vptr.addr());
|
||||||
|
|
||||||
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
||||||
if(!thr) return CELL_ESRCH;
|
if (!thr) return
|
||||||
|
CELL_ESRCH;
|
||||||
|
|
||||||
while (thr->IsAlive())
|
while (thr->IsAlive())
|
||||||
{
|
{
|
||||||
|
@ -83,7 +84,8 @@ s32 sys_ppu_thread_detach(u64 thread_id)
|
||||||
sys_ppu_thread.Todo("sys_ppu_thread_detach(thread_id=%lld)", thread_id);
|
sys_ppu_thread.Todo("sys_ppu_thread_detach(thread_id=%lld)", thread_id);
|
||||||
|
|
||||||
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
||||||
if(!thr) return CELL_ESRCH;
|
if (!thr)
|
||||||
|
return CELL_ESRCH;
|
||||||
|
|
||||||
if (!thr->IsJoinable())
|
if (!thr->IsJoinable())
|
||||||
return CELL_EINVAL;
|
return CELL_EINVAL;
|
||||||
|
@ -104,7 +106,8 @@ s32 sys_ppu_thread_set_priority(u64 thread_id, s32 prio)
|
||||||
sys_ppu_thread.Log("sys_ppu_thread_set_priority(thread_id=%lld, prio=%d)", thread_id, prio);
|
sys_ppu_thread.Log("sys_ppu_thread_set_priority(thread_id=%lld, prio=%d)", thread_id, prio);
|
||||||
|
|
||||||
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
||||||
if(!thr) return CELL_ESRCH;
|
if (!thr)
|
||||||
|
return CELL_ESRCH;
|
||||||
|
|
||||||
thr->SetPrio(prio);
|
thr->SetPrio(prio);
|
||||||
|
|
||||||
|
@ -138,7 +141,8 @@ s32 sys_ppu_thread_stop(u64 thread_id)
|
||||||
sys_ppu_thread.Warning("sys_ppu_thread_stop(thread_id=%lld)", thread_id);
|
sys_ppu_thread.Warning("sys_ppu_thread_stop(thread_id=%lld)", thread_id);
|
||||||
|
|
||||||
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
||||||
if(!thr) return CELL_ESRCH;
|
if (!thr)
|
||||||
|
return CELL_ESRCH;
|
||||||
|
|
||||||
thr->Stop();
|
thr->Stop();
|
||||||
|
|
||||||
|
@ -150,7 +154,8 @@ s32 sys_ppu_thread_restart(u64 thread_id)
|
||||||
sys_ppu_thread.Warning("sys_ppu_thread_restart(thread_id=%lld)", thread_id);
|
sys_ppu_thread.Warning("sys_ppu_thread_restart(thread_id=%lld)", thread_id);
|
||||||
|
|
||||||
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
||||||
if(!thr) return CELL_ESRCH;
|
if (!thr)
|
||||||
|
return CELL_ESRCH;
|
||||||
|
|
||||||
thr->Stop();
|
thr->Stop();
|
||||||
thr->Run();
|
thr->Run();
|
||||||
|
@ -169,8 +174,8 @@ PPUThread* ppu_thread_create(u32 entry, u64 arg, s32 prio, u32 stacksize, bool i
|
||||||
// If not times of smallest allocation unit, round it up to the nearest one.
|
// If not times of smallest allocation unit, round it up to the nearest one.
|
||||||
// And regard zero as a same condition.
|
// And regard zero as a same condition.
|
||||||
sys_ppu_thread.Warning("sys_ppu_thread_create: stacksize increased from 0x%x to 0x%x.",
|
sys_ppu_thread.Warning("sys_ppu_thread_create: stacksize increased from 0x%x to 0x%x.",
|
||||||
stacksize, 4096 * ((u32)(stacksize / 4096) + 1));
|
stacksize, SYS_PPU_THREAD_STACK_MIN * ((u32)(stacksize / SYS_PPU_THREAD_STACK_MIN) + 1));
|
||||||
stacksize = 4096 * ((u32)(stacksize / 4096) + 1);
|
stacksize = SYS_PPU_THREAD_STACK_MIN * ((u32)(stacksize / SYS_PPU_THREAD_STACK_MIN) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 id = new_thread.GetId();
|
u32 id = new_thread.GetId();
|
||||||
|
@ -256,9 +261,8 @@ s32 sys_ppu_thread_rename(u64 thread_id, vm::ptr<const char> name)
|
||||||
sys_ppu_thread.Log("sys_ppu_thread_rename(thread_id=%d, name_addr=0x%x('%s'))", thread_id, name.addr(), name.get_ptr());
|
sys_ppu_thread.Log("sys_ppu_thread_rename(thread_id=%d, name_addr=0x%x('%s'))", thread_id, name.addr(), name.get_ptr());
|
||||||
|
|
||||||
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
std::shared_ptr<CPUThread> thr = Emu.GetCPU().GetThread(thread_id);
|
||||||
if (!thr) {
|
if (!thr)
|
||||||
return CELL_ESRCH;
|
return CELL_ESRCH;
|
||||||
}
|
|
||||||
|
|
||||||
thr->SetThreadName(name.get_ptr());
|
thr->SetThreadName(name.get_ptr());
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
|
|
|
@ -14,6 +14,11 @@ enum ppu_thread_flags : u64
|
||||||
SYS_PPU_THREAD_CREATE_INTERRUPT = 0x2,
|
SYS_PPU_THREAD_CREATE_INTERRUPT = 0x2,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum stackSize
|
||||||
|
{
|
||||||
|
SYS_PPU_THREAD_STACK_MIN = 0x4000,
|
||||||
|
};
|
||||||
|
|
||||||
// Aux
|
// Aux
|
||||||
PPUThread* ppu_thread_create(u32 entry, u64 arg, s32 prio, u32 stacksize, bool is_joinable, bool is_interrupt, const std::string& name, std::function<void(PPUThread&)> task = nullptr);
|
PPUThread* ppu_thread_create(u32 entry, u64 arg, s32 prio, u32 stacksize, bool is_joinable, bool is_interrupt, const std::string& name, std::function<void(PPUThread&)> task = nullptr);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue