]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-top-half/musl/src/thread/pthread_mutex_destroy.c
Update to musl 1.2.2.
[wasi-libc.git] / libc-top-half / musl / src / thread / pthread_mutex_destroy.c
index 6d49e689892265e02884cd451d719ab2bed80361..8d1bf77b879212256111446c657209dd7a5cd73c 100644 (file)
@@ -1,6 +1,10 @@
-#include <pthread.h>
+#include "pthread_impl.h"
 
 int pthread_mutex_destroy(pthread_mutex_t *mutex)
 {
+       /* If the mutex being destroyed is process-shared and has nontrivial
+        * type (tracking ownership), it might be in the pending slot of a
+        * robust_list; wait for quiescence. */
+       if (mutex->_m_type > 128) __vm_wait();
        return 0;
 }