On NetBSD-6, real-time signals are not exported to userland by
authorMatthew Mondor <mmondor@pulsar-zone.net>
Tue, 8 Sep 2015 06:39:03 +0000 (02:39 -0400)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Tue, 8 Sep 2015 06:39:03 +0000 (02:39 -0400)
default.  They appear to work, but gdb has trouble to identify
them.  Let's use SIGPWR and SIGXCPU instead for diagnostics.

src/bdwgc/include/private/gc_priv.h
src/bdwgc/include/private/gcconfig.h
src/bdwgc/pthread_stop_world.c

index ffbcc5b..aa6522d 100644 (file)
@@ -2426,10 +2426,14 @@ GC_INNER ptr_t GC_store_debug_info(ptr_t p, word sz, const char *str,
 #   ifndef GC_OPENBSD_UTHREADS
 #     define SIG_SUSPEND SIGXFSZ
 #   endif
+# elif defined(GC_NETBSD_THREADS)
+#   define SIG_SUSPEND SIGPWR
 # elif defined(_SIGRTMIN)
 #   define SIG_SUSPEND _SIGRTMIN + 6
-# else
+# elif defined(SIGRTMIN)
 #   define SIG_SUSPEND SIGRTMIN + 6
+# else
+#error "Could not determine SIG_SUSPEND for your operating system"
 # endif
 #endif /* GC_PTHREADS && !SIG_SUSPEND */
 
index 9dfcc06..6fb6765 100644 (file)
 # define GC_EXPLICIT_SIGNALS_UNBLOCK
 #endif
 
+/*
 #ifdef GC_NETBSD_THREADS
 # define SIGRTMIN 33
 # define SIGRTMAX 63
 #endif
+*/
 
 #ifdef GC_OPENBSD_THREADS
 # include <sys/param.h>
index a68e922..db11990 100644 (file)
@@ -135,7 +135,11 @@ STATIC volatile AO_t GC_world_is_stopped = FALSE;
 #   ifdef _SIGRTMIN
 #     define SIG_THR_RESTART _SIGRTMIN + 5
 #   else
-#     define SIG_THR_RESTART SIGRTMIN + 5
+#     ifdef SIGRTMIN
+#       define SIG_THR_RESTART SIGRTMIN + 5
+#     else
+#       define SIG_THR_RESTART SIGXCPU
+#     endif
 #   endif
 # else
 #   define SIG_THR_RESTART SIGXCPU