forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Create thread in slim partition

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Wed Oct 08, 2008 5:47 am    Post subject: Create thread in slim partition Reply with quote

Hi, i would like to know if it would be possible to load a thread in the slim partition (8) to use it memory ?

For now i'm allocating some stuff in it but it would be easier to allocate a thread directly in this partition.

Thanks in advance for any help.
Back to top
View user's profile Send private message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Wed Oct 08, 2008 10:51 pm    Post subject: Reply with quote

I tried to create a thread in an allocated bloc, according to the pspsdk includes, but i get an "800200d6" error (SCE_KERNEL_ERROR_ILLEGAL_PARTITION).
Any help would be really great.

My code :

Code:

   SceUID mheapid = sceKernelCreateHeap(8, 1024 * 1024, 1, "custom_heap");   

   SceKernelThreadOptParam option;
   memset(&option, 0, sizeof(option));
   option.size = sizeof(option);
   option.stackMpid = mheapid;



        thid = sceKernelCreateThread("mythid", mthread, THREAD_PRIORITY, 0x1000, 0, &option);

        if (thid >= 0) sceKernelStartThread(thid, 0, NULL);
      else printf("error : %x\n", thid);
Back to top
View user's profile Send private message
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Thu Oct 09, 2008 9:51 pm    Post subject: Reply with quote

Problem solved, if someone need it, we just need to pass the memory partition number, not a memory block id.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group