]> granicus.if.org Git - gc/commitdiff
Remove 'ifdef USE_SPIN_LOCK' which is always false in gc_locks.h
authorIvan Maidanski <ivmai@mail.ru>
Fri, 10 Nov 2017 15:44:57 +0000 (18:44 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 15 Dec 2017 18:19:59 +0000 (21:19 +0300)
(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

index e03fa67ae1ccd2a6ead2b3d3c858d4db035fcf9d..d08dcc40142e1943c681114a4667bf3f390bac52 100644 (file)
                   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)) \