The solution is to use Win32 threads for parallel markers while using
winpthreads to provide GC-aware pthread_create/join/detach and fork.
See details in GitHub issue #81 and issue #119.
* win32_threads.c (GC_PTHREADS_PARAMARK): Do not define if
GC_PTHREADS, PARALLEL_MARK and __MINGW32__ (to workaround a deadlock
in do_sema_b_wait() of winpthreads).
# if defined(GC_PTHREADS) && !defined(GC_PTHREADS_PARAMARK)
/* Use pthread-based parallel mark implementation. */
-# define GC_PTHREADS_PARAMARK
+
+ /* Workaround a deadlock in winpthreads-3.0b internals (observed */
+ /* with MinGW 32/64). */
+# if !defined(__MINGW32__)
+# define GC_PTHREADS_PARAMARK
+# endif
# endif
# if !defined(GC_PTHREADS_PARAMARK)