int pthread_create(pthread_t *restrict thread, const pthread_attr_t *restrict attr, typeof(void *(void *)) *start_routine, void *restrict arg);
thread
, a return value.
attributes
, but this can be null
start_routine
arg
as the argument.
int pthread_join(pthread_t thread, void **retval);
thread
the thread id to wait for
retval
a pointer to return data.
[[noreturn]] void pthread_exit(void *retval);
return *retval
is the same
pthread_self()
returns the thread id