]> 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, 10 Nov 2017 15:44:57 +0000 (18:44 +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 e417a6b4b53ebfb0bed6e4e46e2401d0ce43a659..6b1d1e0a16a4967991878bb7cd56c7162263b3df 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)) \