The function to get the running threads is working great, but the one for the module is listing only around 10 modules. Is it a prob of the 3.03 firmware, and if yes does someone have a solution ? Thanks in advance !
Here is the code :
Code: Select all
SceUID thids[50];
int thid_count = 0;
int i;
SceKernelThreadInfo thinfo;
void thlist() {
char szString[256] = "";
int fd = sceIoOpen("ms0:/thlist.txt", PSP_O_WRONLY |PSP_O_CREAT/*|PSP_O_APPEND*/, 0777);
sceKernelGetThreadmanIdList(SCE_KERNEL_TMID_Thread,thids,50,&thid_count);
for(i=0;i<thid_count;i++)
{
memset(&thinfo,0,sizeof(SceKernelThreadInfo));
thinfo.size = sizeof(SceKernelThreadInfo);
sceKernelReferThreadStatus(thids[i],&thinfo);
sceIoLseek(fd, 0, SEEK_END);
sprintf( szString, &thinfo.name[0]);
sceIoWrite(fd, szString, strlen(szString) );
sceIoLseek(fd, 0, SEEK_END);
sceIoWrite(fd, "--", 2);
}
sceIoClose(fd);
}
SceUID mods[50];
int mod_count = 0;
int x;
SceKernelModuleInfo modinfo;
void modlist() {
char szString2[256] = "";
int fd2 = sceIoOpen("ms0:/modlist.txt", PSP_O_WRONLY |PSP_O_CREAT/*|PSP_O_APPEND*/, 0777);
sceKernelGetModuleIdList(mods,50,&mod_count);
for(x=0;x<mod_count;x++)
{
memset(&modinfo,0,sizeof(SceKernelModuleInfo));
modinfo.size = sizeof(SceKernelModuleInfo);
sceKernelQueryModuleInfo(mods[x],&modinfo);
sceIoLseek(fd2, 0, SEEK_END);
sprintf( szString2, &modinfo.name[0]);
sceIoWrite(fd2, szString2, strlen(szString2) );
sceIoLseek(fd2, 0, SEEK_END);
sceIoWrite(fd2, "--", 2);
sceKernelDelayThread(10*10000);
}
sceIoClose(fd2);
}