fix major breakage in pthread_once (it was always deadlocking)
[oweals/musl.git] / src / thread / pthread_mutex_init.c
index d453543d06709856ca4a075103a298bd6f6fb0da..6e23df139a213f64b036b901fa9f933c7cf59419 100644 (file)
@@ -3,7 +3,6 @@
 int pthread_mutex_init(pthread_mutex_t *m, const pthread_mutexattr_t *a)
 {
        memset(m, 0, sizeof *m);
-       if (a) {
-       }
+       if (a) m->_m_type = *a & 3;
        return 0;
 }