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: v7.6.2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c30caafc636b8dd0f966a825c5db1beb243ff21d;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 e03fa67a..d08dcc40 100644 --- a/include/private/gc_locks.h +++ b/include/private/gc_locks.h @@ -157,11 +157,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)) \