2 #ifndef _3DS_PTHREAD_WRAP__
3 #define _3DS_PTHREAD_WRAP__
11 #define CTR_PTHREAD_STACK_SIZE (1000000 * 12)
13 typedef int32_t pthread_t;
14 typedef int pthread_attr_t;
16 static inline int pthread_create(pthread_t *thread,
17 const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg)
19 thread = threadCreate(start_routine, arg, CTR_PTHREAD_STACK_SIZE, 0x25, -2, FALSE);
24 static inline int pthread_join(pthread_t thread, void **retval)
28 if(threadJoin(thread, INT64_MAX))
37 static inline void pthread_exit(void *retval)
45 #endif //_3DS_PTHREAD_WRAP__