summaryrefslogtreecommitdiffstats
path: root/src/mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mutex.c')
-rw-r--r--src/mutex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mutex.c b/src/mutex.c
index a528ef0..3de7f44 100644
--- a/src/mutex.c
+++ b/src/mutex.c
@@ -4,6 +4,7 @@
#include "jemalloc/internal/assert.h"
#include "jemalloc/internal/malloc_io.h"
+#include "jemalloc/internal/spin.h"
#ifndef _CRT_SPINCOUNT
#define _CRT_SPINCOUNT 4000
@@ -53,7 +54,7 @@ malloc_mutex_lock_slow(malloc_mutex_t *mutex) {
int cnt = 0, max_cnt = MALLOC_MUTEX_MAX_SPIN;
do {
- CPU_SPINWAIT;
+ spin_cpu_spinwait();
if (!malloc_mutex_trylock_final(mutex)) {
data->n_spin_acquired++;
return;