aboutsummaryrefslogtreecommitdiff
path: root/src
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 19:35:12 -0700
commit3f2b8d9cfaebdf0565da3f1ea6e8af11874eae8f (patch)
tree091fba49d02fc6e119abe95b8d838db48e2b9ebb /src
parenta99e0fa2d21917cbcefd8b7a9a2128ae0399d88f (diff)
downloadjemalloc-3f2b8d9cfaebdf0565da3f1ea6e8af11874eae8f.tar.gz
Add os_unfair_lock support.
OS X 10.12 deprecated OSSpinLock; os_unfair_lock is the recommended replacement.
Diffstat (limited to 'src')
-rw-r--r--src/mutex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mutex.c b/src/mutex.c
index a1fac34..6333e73 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))