Page 1 of 1

Question about ps2link's HOOK_THREADS

Posted: Mon Feb 25, 2008 2:21 pm
by Fakeuser
Hi,I'm newbie here,just start using ps2link.
I notice ps2link's HOOK_THREADS option will hook kernel CreateThread/DeleteThread calls to count current active threads.I wonder why not also hook iCreateThread,iDeleteThread,ExitDeleteThread..etc calls?
Is there any other way to count new active threads since ps2link launched instead of hook system calls?

Posted: Mon Feb 25, 2008 5:39 pm
by Lukasz
I actually don't know why the interrupt safe thread syscalls are not hooked, I guess no one has requested/needed them yet. Feel free to submit a patch :-)

As for counting active threads, you can atleast get the status for all created threads by trying all possible thread IDs (starting from 0 to ?) using the syscall ReferThreadStatus

Posted: Sat Mar 01, 2008 5:51 pm
by Fakeuser
Thanks.

Seems ps2link will get exception if HOOK_THREADS and BUILTIN_IRXS are all enabled during booting(maybe ps2smap loading issue).