Create thread in slim partition

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Create thread in slim partition

Post by Cpasjuste »

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.
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

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: Select all

	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);
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

Problem solved, if someone need it, we just need to pass the memory partition number, not a memory block id.
Post Reply