Question about ps2link's HOOK_THREADS

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
Fakeuser
Posts: 13
Joined: Sat Sep 01, 2007 4:18 am

Question about ps2link's HOOK_THREADS

Post 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?
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post 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
Fakeuser
Posts: 13
Joined: Sat Sep 01, 2007 4:18 am

Post by Fakeuser »

Thanks.

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