aboutsummaryrefslogtreecommitdiff
path: root/dep/jemalloc/src/mutex.c
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2018-05-11 20:36:14 +0200
committerjackpoz <giacomopoz@gmail.com>2018-05-12 09:37:51 +0200
commit8fe74bf0f90aab0b23d5ff21079cba4201bb4fdf (patch)
treedbd187bf59f55f81cb81d01acd4998077553fb9b /dep/jemalloc/src/mutex.c
parente5b3814020fe1a288f4cd8bbf0289bd0abfd5c10 (diff)
Dep/Jemalloc: Update to Jemalloc 5.1.0
Diffstat (limited to 'dep/jemalloc/src/mutex.c')
-rw-r--r--dep/jemalloc/src/mutex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dep/jemalloc/src/mutex.c b/dep/jemalloc/src/mutex.c
index a528ef0c243..30222b3e582 100644
--- a/dep/jemalloc/src/mutex.c
+++ b/dep/jemalloc/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;
@@ -173,7 +174,7 @@ malloc_mutex_init(malloc_mutex_t *mutex, const char *name,
mutex->lock_order = lock_order;
if (lock_order == malloc_mutex_address_ordered) {
witness_init(&mutex->witness, name, rank,
- mutex_addr_comp, &mutex);
+ mutex_addr_comp, mutex);
} else {
witness_init(&mutex->witness, name, rank, NULL, NULL);
}