ditch the priority inheritance locks; use malloc's version of lock
[musl] / src / exit / exit.c
index 1ff19db..ae557c0 100644 (file)
@@ -13,10 +13,10 @@ weak_alias(dummy, __fflush_on_exit);
 
 void exit(int code)
 {
-       static int lock;
+       static int lock[2];
 
        /* If more than one thread calls exit, hang until _Exit ends it all */
-       LOCK(&lock);
+       LOCK(lock);
 
        /* Only do atexit & stdio flush if they were actually used */
        __funcs_on_exit();