aboutsummaryrefslogtreecommitdiffstats
path: root/src/mutex.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-11-02 18:09:45 -0700
committerJason Evans <jasone@canonware.com>2016-11-02 18:09:45 -0700
commit795f6689dec28f161afbf5964ef1b17288dd384d (patch)
tree2129b9e890bb8f0abfad0d17606c7fe0adf0b001 /src/mutex.c
parentd9f7b2a4307f7ff9f7a139b33d366d44e8a8b83d (diff)
downloadplatform_external_jemalloc_new-795f6689dec28f161afbf5964ef1b17288dd384d.tar.gz
platform_external_jemalloc_new-795f6689dec28f161afbf5964ef1b17288dd384d.tar.bz2
platform_external_jemalloc_new-795f6689dec28f161afbf5964ef1b17288dd384d.zip
Add os_unfair_lock support.
OS X 10.12 deprecated OSSpinLock; os_unfair_lock is the recommended replacement.
Diffstat (limited to 'src/mutex.c')
-rw-r--r--src/mutex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mutex.c b/src/mutex.c
index 119b8e35..b757ba86 100644
--- a/src/mutex.c
+++ b/src/mutex.c
@@ -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))