int sys_ppu_thread_exit()//exit function
{
system_call_1(41, 0);
return_to_user_prog(int);
}
sys_ppu_thread_t create_thread(void (*entry)(uint64_t), int priority, size_t stacksize, const char* threadname)//thread
{
if(sys_ppu_thread_create(&id, entry, 0, priority , stacksize, 0, threadname) != CELL_OK)
{
console_write("Thread creation failed\n");
}
else
{
console_write("Thread created\n");
}
return id;
}
create_thread(function, 0x4A9, 0x100, "test");//calls function
void function(uint64_t arg)
{
sys_ppu_thread_exit();//wanna exit and clean stack
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.