diff options
author | Jason Evans <jasone@canonware.com> | 2016-11-02 18:09:45 -0700 |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-11-02 18:09:45 -0700 |
commit | 795f6689dec28f161afbf5964ef1b17288dd384d (patch) | |
tree | 2129b9e890bb8f0abfad0d17606c7fe0adf0b001 /src | |
parent | d9f7b2a4307f7ff9f7a139b33d366d44e8a8b83d (diff) | |
download | platform_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')
-rw-r--r-- | src/mutex.c | 2 |
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)) |