Skip to content

Commit

Permalink
Remove 'ifdef USE_SPIN_LOCK' which is always false in gc_locks.h
Browse files Browse the repository at this point in the history
(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().
  • Loading branch information
ivmai committed Nov 10, 2017
1 parent 908fe36 commit 47b1dea
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions include/private/gc_locks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)) \
Expand Down

0 comments on commit 47b1dea

Please sign in to comment.