return ExceptionContinueSearch;
}
}
-# endif /* __GNUC__ && MSWIN32 */
+# endif /* __GNUC__ && MSWIN32 */
-#if defined(GC_WIN32_THREADS) && !defined(__GNUC__)
+#if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
GC_INNER GC_bool GC_started_thread_while_stopped(void);
/* In win32_threads.c. Did we invalidate mark phase with an */
/* unexpected thread start? */
EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) {
goto handle_ex;
}
-# ifdef GC_WIN32_THREADS
+# if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
/* With DllMain-based thread tracking, a thread may have */
/* started while we were marking. This is logically equivalent */
/* to the exception case; our results are invalid and we have */
/* and thus eliminating it. */
if (er.alt_path == 0)
goto handle_ex;
+# if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
+ if (GC_started_thread_while_stopped())
+ goto handle_ex;
+# endif
rm_handler:
/* Uninstall the exception handler */
__asm__ __volatile__ ("mov %0, %%fs:0" : : "r" (er.ex_reg.prev));
STATIC volatile AO_t GC_attached_thread = FALSE;
#endif
-#if !defined(__GNUC__)
+#if defined(WRAP_MARK_SOME) && !defined(GC_PTHREADS)
/* Return TRUE if an thread was attached since we last asked or */
/* since GC_attached_thread was explicitly reset. */
GC_INNER GC_bool GC_started_thread_while_stopped(void)
# endif
return FALSE;
}
-#endif /* !__GNUC__ */
+#endif /* WRAP_MARK_SOME */
/* Thread table used if GC_win32_dll_threads is set. */
/* This is a fixed size array. */