Add os_unfair_lock support.

OS X 10.12 deprecated OSSpinLock; os_unfair_lock is the recommended
replacement.
This commit is contained in:
Jason Evans
2016-11-02 18:09:45 -07:00
parent d9f7b2a430
commit 795f6689de
7 changed files with 42 additions and 0 deletions

View File

@@ -80,6 +80,8 @@ malloc_mutex_init(malloc_mutex_t *mutex, const char *name, witness_rank_t rank)
_CRT_SPINCOUNT))
return (true);
# endif
#elif (defined(JEMALLOC_OS_UNFAIR_LOCK))
mutex->lock = OS_UNFAIR_LOCK_INIT;
#elif (defined(JEMALLOC_OSSPIN))
mutex->lock = 0;
#elif (defined(JEMALLOC_MUTEX_INIT_CB))