for c11 mtx and cnd functions, use externally consistent type names
[musl] / src / thread / pthread_create.c
index 2c066cf..27ace2c 100644 (file)
@@ -165,8 +165,8 @@ static void *dummy_tsd[1] = { 0 };
 weak_alias(dummy_tsd, __pthread_tsd_main);
 
 volatile int __block_new_threads = 0;
-size_t __default_stacksize = DEFAULT_STACK_SIZE;
-size_t __default_guardsize = DEFAULT_GUARD_SIZE;
+extern size_t __default_stacksize;
+extern size_t __default_guardsize;
 
 static FILE *volatile dummy_file = 0;
 weak_alias(dummy_file, __stdin_used);
@@ -306,6 +306,7 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att
 
        if (do_sched) {
                __futexwait(&ssa.futex, -1, 1);
+               ret = ssa.futex;
                if (ret) return ret;
        }