X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=frontend%2F3ds%2Fpthread.h;h=42de161f4f40d7518f2a55f2c9beb6fd12a7708c;hb=e237fbf62ef226bd5c5be317c6b837cb7515a150;hp=56d9085212b0a9d4ad32eec0a33cfb9216cc296d;hpb=4e45781a20e189ed5efbe471ce6343c571385646;p=pcsx_rearmed.git diff --git a/frontend/3ds/pthread.h b/frontend/3ds/pthread.h index 56d90852..42de161f 100644 --- a/frontend/3ds/pthread.h +++ b/frontend/3ds/pthread.h @@ -2,18 +2,18 @@ #ifndef _3DS_PTHREAD_WRAP__ #define _3DS_PTHREAD_WRAP__ -#include "3ds.h" -#include "stdlib.h" -#include "string.h" -#include "stdio.h" +#include +#include +#include +#include "3ds_utils.h" #define CTR_PTHREAD_STACK_SIZE 0x10000 typedef struct { - Handle handle; - u32* stack; + int32_t handle; + uint32_t* stack; }pthread_t; typedef int pthread_attr_t; @@ -23,9 +23,9 @@ static inline int pthread_create(pthread_t *thread, thread->stack = linearMemAlign(CTR_PTHREAD_STACK_SIZE, 8); - svcCreateThread(&thread->handle, (ThreadFunc)start_routine,arg, - (u32*)((u32)thread->stack + CTR_PTHREAD_STACK_SIZE), - 0x25, 1); + svcCreateThread(&thread->handle, start_routine, arg, + (uint32_t*)((uint32_t)thread->stack + CTR_PTHREAD_STACK_SIZE), + 0x25, -2); return 1; }