1 #include <lunaix/syscall.h>
5 pthread_create(pthread_t* thread,
6 const pthread_attr_t* attr,
7 void *(*start_routine)(void*), void* arg)
9 // FIXME attr currently not used
11 struct uthread_param th_param;
13 th_param.th_handler = start_routine;
16 extern void th_trampoline();
17 ret = do_lunaix_syscall(__SYSCALL_th_create, thread,
18 &th_param, th_trampoline);
23 pthread_detach(pthread_t thread)
25 return do_lunaix_syscall(__SYSCALL_th_detach, thread);
29 pthread_exit(void *value_ptr)
31 do_lunaix_syscall(__SYSCALL_th_exit, value_ptr);
35 pthread_join(pthread_t thread, void **value_ptr)
37 return do_lunaix_syscall(__SYSCALL_th_join, thread, value_ptr);
41 pthread_kill(pthread_t thread, int sig)
43 return do_lunaix_syscall(__SYSCALL_th_kill, thread, sig);
49 return do_lunaix_syscall(__SYSCALL_th_self);