diff options
author | jackpoz <giacomopoz@gmail.com> | 2018-05-11 20:36:14 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-09-26 20:50:35 +0200 |
commit | 501bb9dc6702f8130ccd077bad30828705454a01 (patch) | |
tree | c092752bb73ed7ef212ad31516e08e23e2eb123c /dep/jemalloc/src/mutex.c | |
parent | 9c65f4e27c360464869dc401453ebc5c7ba3d78b (diff) |
Dep/Jemalloc: Update to Jemalloc 5.1.0
(cherry picked from commit 8fe74bf0f90aab0b23d5ff21079cba4201bb4fdf)
Diffstat (limited to 'dep/jemalloc/src/mutex.c')
-rw-r--r-- | dep/jemalloc/src/mutex.c | 5 |
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); } |