Merge pull request #34 from osvcos/master

Relocate sys_process_is_stack to sysPrxForUser.cpp
This commit is contained in:
Hykem 2013-12-27 13:50:25 -08:00
commit 69be408b32
4 changed files with 10 additions and 11 deletions

View File

@ -3592,7 +3592,6 @@ s64 SysCalls::DoFunc(const u32 id)
case 0x4643ba6e: FUNC_LOG_ERROR("TODO: sys_mmapper_unmap_memory");
case 0x4a071d98: FUNC_LOG_ERROR("TODO: sys_interrupt_thread_disestablish");
case 0x4b2f301a: FUNC_LOG_ERROR("TODO: _sys_tolower");
case 0x4f7172c9: FUNC_LOG_ERROR("TODO: sys_process_is_stack");
case 0x5267cb35: FUNC_LOG_ERROR("TODO: sys_spinlock_unlock");
case 0x52aadadf: FUNC_LOG_ERROR("TODO: sys_lwcond_signal_to");
case 0x5fdfb2fe: FUNC_LOG_ERROR("TODO: _sys_spu_printf_detach_group");

View File

@ -22,6 +22,15 @@ s64 sys_process_at_Exitspawn()
return 0;
}
int sys_process_is_stack(u32 p)
{
PPCThread* CPU = GetCurrentPPCThread();
if (p >= CPU->GetStackAddr() && p <= CPU->GetStackAddr() + CPU->GetStackSize())
return 1;
return 0;
}
int sys_spu_printf_initialize(int a1, int a2, int a3, int a4, int a5)
{
sysPrxForUser.Warning("sys_spu_printf_initialize(0x%x, 0x%x, 0x%x, 0x%x, 0x%x)", a1, a2, a3, a4, a5);
@ -62,6 +71,7 @@ void sysPrxForUser_init()
sysPrxForUser.AddFunc(0xe6f2c1e7, sys_process_exit);
sysPrxForUser.AddFunc(0x2c847572, sys_process_atexitspawn);
sysPrxForUser.AddFunc(0x96328741, sys_process_at_Exitspawn);
sysPrxForUser.AddFunc(0x4f7172c9, sys_process_is_stack);
sysPrxForUser.AddFunc(0x24a1ea07, sys_ppu_thread_create);
sysPrxForUser.AddFunc(0x350d454e, sys_ppu_thread_get_id);

View File

@ -117,7 +117,6 @@ extern int sys_process_get_number_of_object(u32 object, mem32_t nump);
extern int sys_process_get_id(u32 object, mem8_ptr_t buffer, u32 size, mem32_t set_size);
extern int sys_process_get_paramsfo(mem8_ptr_t buffer);
extern int sys_process_exit(int errorcode);
extern int sys_process_is_stack(u32 addr); //TODO: Is this a lv2 SysCall? If so, where is its number?
extern int sys_game_process_exitspawn(u32 path_addr, u32 argv_addr, u32 envp_addr,
u32 data, u32 data_size, int prio, u64 flags );

View File

@ -245,15 +245,6 @@ int sys_process_get_paramsfo(mem8_ptr_t buffer)
return CELL_OK;*/
}
int sys_process_is_stack(u32 p)
{
PPCThread* CPU = GetCurrentPPCThread();
if (p >= CPU->GetStackAddr() && p <= CPU->GetStackAddr() + CPU->GetStackSize())
return 1;
return 0;
}
/*
int SysCalls::lv2ProcessWaitForChild(PPUThread& CPU)
{