Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
daanx committed Dec 21, 2024
1 parent 476d469 commit 825dd41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/mimalloc/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ static inline void mi_lock_done(mi_lock_t* lock) {

#elif defined(MI_USE_PTHREADS)

void _mi_error_message(int err, const char* fmt, ...);

#define mi_lock_t pthread_mutex_t

static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
Expand All @@ -465,7 +467,7 @@ static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
static inline void mi_lock_acquire(mi_lock_t* lock) {
const int err = pthread_mutex_lock(lock);
if (err != 0) {
mi_error_message(EFAULT, "internal error: lock cannot be acquired\n");
_mi_error_message(err, "internal error: lock cannot be acquired\n");
}
}
static inline void mi_lock_release(mi_lock_t* lock) {
Expand Down

0 comments on commit 825dd41

Please sign in to comment.