MCPcopy Create free account
hub / github.com/devkitPro/libctru / __SYSCALL(thread_create)

Function __SYSCALL(thread_create)

libctru/source/system/syscalls.c:194–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194int __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
213void*__SYSCALL(thread_join)(struct __pthread_t *thread)
214{

Callers

nothing calls this directly

Calls 1

threadCreateFunction · 0.85

Tested by

no test coverage detected