(fix commit
0ca6d3f)
* include/private/gc_priv.h [PARALLEL_MARK]
(GC_start_mark_threads_inner): Declare even if no CAN_HANDLE_FORK.
* misc.c [THREADS] (GC_start_mark_threads): Define also for the case
of PARALLEL_MARK and CAN_HANDLE_FORK - call GC_start_mark_threads_inner
surrounded with DISABLE/RESTORE_CANCEL.
* pthread_support.c [PARALLEL_MARK] (GC_start_mark_threads_inner):
Always define as GC_INNER.
* win32_threads.c [GC_PTHREADS_PARAMARK] (GC_start_mark_threads_inner):
Likewise.
/* was already done, or there was nothing to do for */
/* some other reason. */
-# ifdef CAN_HANDLE_FORK
-# define GC_start_mark_threads_inner GC_start_mark_threads
-# else
- GC_INNER void GC_start_mark_threads_inner(void);
-# endif
+ GC_INNER void GC_start_mark_threads_inner(void);
#endif /* PARALLEL_MARK */
#if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) && !defined(NACL) \
GC_init();
}
-#if defined(THREADS) && (!defined(PARALLEL_MARK) || !defined(CAN_HANDLE_FORK))
+#if defined(THREADS)
GC_API void GC_CALL GC_start_mark_threads(void)
{
- /* No action since parallel markers are disabled (or no POSIX fork). */
- GC_ASSERT(I_DONT_HOLD_LOCK());
+# if defined(PARALLEL_MARK) && defined(CAN_HANDLE_FORK)
+ IF_CANCEL(int cancel_state;)
+
+ DISABLE_CANCEL(cancel_state);
+ GC_start_mark_threads_inner();
+ RESTORE_CANCEL(cancel_state);
+# else
+ /* No action since parallel markers are disabled (or no POSIX fork). */
+ GC_ASSERT(I_DONT_HOLD_LOCK());
+# endif
}
#endif
#ifdef CAN_HANDLE_FORK
static int available_markers_m1 = 0;
- GC_API void GC_CALL
#else
# define available_markers_m1 GC_markers_m1
- GC_INNER void
#endif
- GC_start_mark_threads_inner(void)
+
+GC_INNER void GC_start_mark_threads_inner(void)
{
int i;
pthread_attr_t attr;
/* for thread stack that is assumed to be large enough. */
# ifdef CAN_HANDLE_FORK
static int available_markers_m1 = 0;
- GC_API void GC_CALL
-# else
- GC_INNER void
# endif
- GC_start_mark_threads_inner(void)
+
+ GC_INNER void GC_start_mark_threads_inner(void)
{
int i;
pthread_attr_t attr;