From: Ivan Maidanski Date: Fri, 10 Nov 2017 15:44:57 +0000 (+0300) Subject: Remove 'ifdef USE_SPIN_LOCK' which is always false in gc_locks.h X-Git-Tag: v8.0.0~517 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47b1deafdcf870bf5831a415cf8909589affd35f;p=gc Remove 'ifdef USE_SPIN_LOCK' which is always false in gc_locks.h (fix commit 9a20535) * include/private/gc_locks.h [!GC_WIN32_THREADS && GC_PTHREADS && USE_PTHREAD_LOCKS && !GC_ASSERTIONS && NO_PTHREAD_TRYLOCK && USE_SPIN_LOCK] (UNCOND_LOCK): Define to pthread_mutex_lock(&GC_allocate_ml) instead of GC_lock(). --- diff --git a/include/private/gc_locks.h b/include/private/gc_locks.h index e417a6b4..6b1d1e0a 100644 --- a/include/private/gc_locks.h +++ b/include/private/gc_locks.h @@ -161,11 +161,7 @@ pthread_mutex_unlock(&GC_allocate_ml); } # else /* !GC_ASSERTIONS */ # if defined(NO_PTHREAD_TRYLOCK) -# ifdef USE_SPIN_LOCK -# define UNCOND_LOCK() GC_lock() -# else -# define UNCOND_LOCK() pthread_mutex_lock(&GC_allocate_ml) -# endif +# define UNCOND_LOCK() pthread_mutex_lock(&GC_allocate_ml) # else # define UNCOND_LOCK() \ { if (0 != pthread_mutex_trylock(&GC_allocate_ml)) \