| 192 | } |
| 193 | |
| 194 | int __SYSCALL(thread_create)(struct __pthread_t **thread, void* (*func)(void*), void *arg, void *stack_addr, size_t stack_size) |
| 195 | { |
| 196 | if (stack_addr) { |
| 197 | return EINVAL; |
| 198 | } |
| 199 | |
| 200 | if (!stack_size) { |
| 201 | stack_size = 32*1024; |
| 202 | } |
| 203 | |
| 204 | Thread t = threadCreate((ThreadFunc)func, arg, stack_size, 0x3F, 0, false); |
| 205 | if (t) { |
| 206 | *thread = (struct __pthread_t*)t; |
| 207 | return 0; |
| 208 | } |
| 209 | |
| 210 | return ENOMEM; |
| 211 | } |
| 212 | |
| 213 | void*__SYSCALL(thread_join)(struct __pthread_t *thread) |
| 214 | { |
nothing calls this directly
no test coverage detected