* include/private/gc_locks.h [USE_PTHREAD_LOCKS && GC_PTHREADS]
(GC_collecting): Do not declare if GC_WIN32_THREADS.
* include/private/gc_locks.h [USE_PTHREAD_LOCKS && GC_PTHREADS]
(ENTER_GC, EXIT_GC): Do not define if GC_WIN32_THREADS; remove
trailing ';', add cast to void.
* win32_threads.c [USE_PTHREAD_LOCKS] (GC_collecting): Remove definition.
|| GC_lock_holder != NUMERIC_THREAD_ID(pthread_self()))
# endif
# endif /* GC_ASSERTIONS */
- GC_EXTERN volatile GC_bool GC_collecting;
-# define ENTER_GC() GC_collecting = 1;
-# define EXIT_GC() GC_collecting = 0;
+# ifndef GC_WIN32_THREADS
+ GC_EXTERN volatile GC_bool GC_collecting;
+# define ENTER_GC() (void)(GC_collecting = TRUE)
+# define EXIT_GC() (void)(GC_collecting = FALSE)
+# endif
GC_INNER void GC_lock(void);
# endif /* GC_PTHREADS */
# if defined(GC_ALWAYS_MULTITHREADED) \
/* pthread_mutex_trylock may not win here, */
/* due to builtin support for spinning first? */
- GC_INNER volatile GC_bool GC_collecting = 0;
- /* A hint that we're in the collector and */
- /* holding the allocation lock for an */
- /* extended period. */
-
GC_INNER void GC_lock(void)
{
pthread_mutex_lock(&GC_allocate_ml);