sys_ppu_thread: Fix u64 stack size argument
This commit is contained in:
@@ -468,11 +468,11 @@ error_code sys_ppu_thread_restart(ppu_thread& ppu)
|
|||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
error_code _sys_ppu_thread_create(ppu_thread& ppu, vm::ptr<u64> thread_id, vm::ptr<ppu_thread_param_t> param, u64 arg, u64 unk, s32 prio, u32 _stacksz, u64 flags, vm::cptr<char> threadname)
|
error_code _sys_ppu_thread_create(ppu_thread& ppu, vm::ptr<u64> thread_id, vm::ptr<ppu_thread_param_t> param, u64 arg, u64 unk, s32 prio, u64 _stacksz, u64 flags, vm::cptr<char> threadname)
|
||||||
{
|
{
|
||||||
ppu.state += cpu_flag::wait;
|
ppu.state += cpu_flag::wait;
|
||||||
|
|
||||||
sys_ppu_thread.warning("_sys_ppu_thread_create(thread_id=*0x%x, param=*0x%x, arg=0x%llx, unk=0x%llx, prio=%d, stacksize=0x%x, flags=0x%llx, threadname=*0x%x)",
|
sys_ppu_thread.warning("_sys_ppu_thread_create(thread_id=*0x%x, param=*0x%x, arg=0x%llx, unk=0x%llx, prio=%d, stacksize=0x%llx, flags=0x%llx, threadname=*0x%x)",
|
||||||
thread_id, param, arg, unk, prio, _stacksz, flags, threadname);
|
thread_id, param, arg, unk, prio, _stacksz, flags, threadname);
|
||||||
|
|
||||||
// thread_id is checked for null in stub -> CELL_ENOMEM
|
// thread_id is checked for null in stub -> CELL_ENOMEM
|
||||||
@@ -497,7 +497,8 @@ error_code _sys_ppu_thread_create(ppu_thread& ppu, vm::ptr<u64> thread_id, vm::p
|
|||||||
const u32 tls = param->tls;
|
const u32 tls = param->tls;
|
||||||
|
|
||||||
// Compute actual stack size and allocate
|
// Compute actual stack size and allocate
|
||||||
const u32 stack_size = utils::align<u32>(std::max<u32>(_stacksz, 4096), 4096);
|
// 0 and UINT64_MAX both convert to 4096
|
||||||
|
const u64 stack_size = FN(x ? x : 4096)(utils::align<u64>(_stacksz, 4096));
|
||||||
|
|
||||||
auto& dct = g_fxo->get<lv2_memory_container>();
|
auto& dct = g_fxo->get<lv2_memory_container>();
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ error_code sys_ppu_thread_get_priority(ppu_thread& ppu, u32 thread_id, vm::ptr<s
|
|||||||
error_code sys_ppu_thread_get_stack_information(ppu_thread& ppu, vm::ptr<sys_ppu_thread_stack_t> sp);
|
error_code sys_ppu_thread_get_stack_information(ppu_thread& ppu, vm::ptr<sys_ppu_thread_stack_t> sp);
|
||||||
error_code sys_ppu_thread_stop(ppu_thread& ppu, u32 thread_id);
|
error_code sys_ppu_thread_stop(ppu_thread& ppu, u32 thread_id);
|
||||||
error_code sys_ppu_thread_restart(ppu_thread& ppu);
|
error_code sys_ppu_thread_restart(ppu_thread& ppu);
|
||||||
error_code _sys_ppu_thread_create(ppu_thread& ppu, vm::ptr<u64> thread_id, vm::ptr<ppu_thread_param_t> param, u64 arg, u64 arg4, s32 prio, u32 stacksize, u64 flags, vm::cptr<char> threadname);
|
error_code _sys_ppu_thread_create(ppu_thread& ppu, vm::ptr<u64> thread_id, vm::ptr<ppu_thread_param_t> param, u64 arg, u64 arg4, s32 prio, u64 stacksize, u64 flags, vm::cptr<char> threadname);
|
||||||
error_code sys_ppu_thread_start(ppu_thread& ppu, u32 thread_id);
|
error_code sys_ppu_thread_start(ppu_thread& ppu, u32 thread_id);
|
||||||
error_code sys_ppu_thread_rename(ppu_thread& ppu, u32 thread_id, vm::cptr<char> name);
|
error_code sys_ppu_thread_rename(ppu_thread& ppu, u32 thread_id, vm::cptr<char> name);
|
||||||
error_code sys_ppu_thread_recover_page_fault(ppu_thread& ppu, u32 thread_id);
|
error_code sys_ppu_thread_recover_page_fault(ppu_thread& ppu, u32 thread_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user