]> granicus.if.org Git - gc/commitdiff
Remove code duplication in gc_locks.h regarding USE_PTHREAD_LOCKS
authorIvan Maidanski <ivmai@mail.ru>
Thu, 12 Apr 2012 19:44:00 +0000 (23:44 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 12 Apr 2012 19:44:00 +0000 (23:44 +0400)
* include/private/gc_locks.h (USE_PTHREAD_LOCKS): Remove code
duplication.

include/private/gc_locks.h

index a5d9c35fc39355389b084b9f37a90774481d452c..0296707f2e0bd5cf336ab7055c9e458b5835baf1 100644 (file)
 #    define UNCOND_UNLOCK() PCR_Th_ML_Release(&GC_allocate_ml)
 #  endif
 
-#  if !defined(AO_HAVE_test_and_set_acquire) && defined(GC_PTHREADS)
-#    define USE_PTHREAD_LOCKS
-#  endif
-
-#  if defined(GC_WIN32_THREADS) && defined(GC_PTHREADS)
-#    define USE_PTHREAD_LOCKS
-#  endif
-
-#  if defined(GC_RTEMS_PTHREADS)
+#  if (!defined(AO_HAVE_test_and_set_acquire) || defined(GC_RTEMS_PTHREADS) \
+       || defined(GC_WIN32_THREADS)) && defined(GC_PTHREADS)
 #    define USE_PTHREAD_LOCKS
 #  endif