fix pthread initalization of mutexes

This commit is contained in:
Daan 2024-06-02 16:41:07 -07:00
parent 768872e4e0
commit 6b15342709
2 changed files with 5 additions and 4 deletions

View file

@ -441,13 +441,13 @@ static inline void mi_lock_release(mi_lock_t* lock) {
pthread_mutex_unlock(lock);
}
static inline void mi_lock_init(mi_lock_t* lock) {
(void)(lock);
pthread_mutex_init(lock, NULL);
}
static inline void mi_lock_done(mi_lock_t* lock) {
(void)(lock);
pthread_mutex_destroy(lock);
}
/*
#elif defined(__cplusplus)
#include <mutex>
@ -469,6 +469,7 @@ static inline void mi_lock_init(mi_lock_t* lock) {
static inline void mi_lock_done(mi_lock_t* lock) {
(void)(lock);
}
*/
#else