#ifndef _3DS_PTHREAD_WRAP__
#define _3DS_PTHREAD_WRAP__
-#include "3ds.h"
-#include "stdlib.h"
-#include "string.h"
-#include "stdio.h"
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#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;
thread->stack = linearMemAlign(CTR_PTHREAD_STACK_SIZE, 8);
- svcCreateThread(&thread->handle, (ThreadFunc)start_routine,arg,
- (u32*)((u32)thread->stack + CTR_PTHREAD_STACK_SIZE),
+ svcCreateThread(&thread->handle, start_routine, arg,
+ (uint32_t*)((uint32_t)thread->stack + CTR_PTHREAD_STACK_SIZE),
0x25, 1);
return 1;