Post: SPRX Exit thread
02-23-2015, 08:41 PM #1
-JM-
Space Ninja
(adsbygoogle = window.adsbygoogle || []).push({}); Can someone help me how can I exit a thread and clean the stack to have memory because when I use the thread is still in the target manager and I want to thread several time the same function and exit it at different time
    

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
}

Thanks I'll rep for answer
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo