AC_DEFINE(GC_GCJ_SUPPORT, 1, [Define to include support for gcj.])
fi
+dnl Interaction with other programs that might use signals.
+AC_ARG_ENABLE(sigrt-signals,
+ [AC_HELP_STRING([--enable-sigrt-signals],
+ [Force GC to use SIGRTMIN-based signals for thread suspend/resume])])
+if test x"${enable_sigrt_signals}" = xyes; then
+ AC_DEFINE([GC_USESIGRT_SIGNALS], 1,
+ [Force the GC to use signals based on SIGRTMIN+k.])
+fi
+
+
dnl Debugging
dnl ---------
#endif /* PARALLEL_MARK */
#if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) && !defined(NACL) \
- && !defined(SIG_SUSPEND)
+ && !defined(GC_DARWIN_THREADS) && !defined(SIG_SUSPEND)
/* We define the thread suspension signal here, so that we can refer */
/* to it in the dirty bit implementation, if necessary. Ideally we */
/* would allocate a (real-time?) signal using the standard mechanism. */
/* unfortunately, there is no standard mechanism. (There is one */
/* in Linux glibc, but it's not exported.) Thus we continue to use */
/* the same hard-coded signals we've always used. */
-# if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS)
+# if (defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS)) \
+ && !defined(GC_USESIGRT_SIGNALS)
# if defined(SPARC) && !defined(SIGPWR)
/* SPARC/Linux doesn't properly define SIGPWR in <signal.h>. */
/* It is aliased to SIGLOST in asm/signal.h, though. */
# ifndef GC_OPENBSD_UTHREADS
# define SIG_SUSPEND SIGXFSZ
# endif
-# elif !defined(GC_DARWIN_THREADS)
-# if defined(_SIGRTMIN)
-# define SIG_SUSPEND _SIGRTMIN + 6
-# else
-# define SIG_SUSPEND SIGRTMIN + 6
-# endif
+# elif defined(_SIGRTMIN)
+# define SIG_SUSPEND _SIGRTMIN + 6
+# else
+# define SIG_SUSPEND SIGRTMIN + 6
# endif
#endif /* GC_PTHREADS && !SIG_SUSPEND */
* Note that we can't just stop a thread; we need it to save its stack
* pointer(s) and acknowledge.
*/
-
#ifndef SIG_THR_RESTART
-# if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) \
- || defined(GC_NETBSD_THREADS)
-# ifdef _SIGRTMIN
-# define SIG_THR_RESTART _SIGRTMIN + 5
-# else
-# define SIG_THR_RESTART SIGRTMIN + 5
-# endif
-# else
+# if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) \
+ || defined(GC_NETBSD_THREADS) || defined(GC_USESIGRT_SIGNALS)
+# ifdef _SIGRTMIN
+# define SIG_THR_RESTART _SIGRTMIN + 5
+# else
+# define SIG_THR_RESTART SIGRTMIN + 5
+# endif
+# else
# define SIG_THR_RESTART SIGXCPU
-# endif
+# endif
#endif
STATIC int GC_sig_suspend = SIG_SUSPEND;