mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-07 07:49:31 +03:00
Clean up atomics header
Both mi_atomic_exchange_ptr and mi_atomic_locked are not really used internally.
This commit is contained in:
parent
3526b09903
commit
efcce4091e
1 changed files with 0 additions and 6 deletions
|
@ -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 <windows.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue