From efcce4091e8a9add1b0b70c6195db8bd6b0b9f60 Mon Sep 17 00:00:00 2001 From: Jim Huang Date: Sun, 23 Jun 2019 23:22:14 +0800 Subject: [PATCH] Clean up atomics header Both mi_atomic_exchange_ptr and mi_atomic_locked are not really used internally. --- include/mimalloc-atomic.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/mimalloc-atomic.h b/include/mimalloc-atomic.h index 05a9f01c..08d465fd 100644 --- a/include/mimalloc-atomic.h +++ b/include/mimalloc-atomic.h @@ -46,15 +46,9 @@ static inline bool mi_atomic_compare_exchange_ptr(volatile void** p, void* newp, return mi_atomic_compare_exchange((volatile uintptr_t*)p, (uintptr_t)newp, (uintptr_t)compare); } -// Atomically exchange a pointer value. -static inline void* mi_atomic_exchange_ptr(volatile void** p, void* exchange) { - return (void*)mi_atomic_exchange((volatile uintptr_t*)p, (uintptr_t)exchange); -} -#define mi_atomic_locked(mutex) for(bool _mheld = mi_mutex_lock(mutex); _mheld; _mheld = mi_mutex_unlock(mutex)) - #ifdef _MSC_VER #define WIN32_LEAN_AND_MEAN #include