fix use of uninitialized pointer in gettext core
[musl.git] / src / thread / thrd_create.c
blobe03366952657117198219b49999d2b3985500fd3
1 #include "pthread_impl.h"
2 #include <threads.h>
4 int __pthread_create(pthread_t *restrict, const pthread_attr_t *restrict, void *(*)(void *), void *restrict);
6 int thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
8 int ret = __pthread_create(thr, __ATTRP_C11_THREAD, (void *(*)(void *))func, arg);
9 switch (ret) {
10 case 0: return thrd_success;
11 case EAGAIN: return thrd_nomem;
12 default: return thrd_error;