From 47b1deafdcf870bf5831a415cf8909589affd35f Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 10 Nov 2017 18:44:57 +0300 Subject: [PATCH] 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(). --- include/private/gc_locks.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/private/gc_locks.h b/include/private/gc_locks.h index e417a6b..6b1d1e0 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)) \ -- 2.7.4