From: Matthew Mondor Date: Tue, 8 Sep 2015 06:39:03 +0000 (-0400) Subject: On NetBSD-6, real-time signals are not exported to userland by X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=ec59639dc2f1273684fb4af07db4fd0763b5081f;p=ecl.git On NetBSD-6, real-time signals are not exported to userland by default. They appear to work, but gdb has trouble to identify them. Let's use SIGPWR and SIGXCPU instead for diagnostics. --- diff --git a/src/bdwgc/include/private/gc_priv.h b/src/bdwgc/include/private/gc_priv.h index ffbcc5b..aa6522d 100644 --- a/src/bdwgc/include/private/gc_priv.h +++ b/src/bdwgc/include/private/gc_priv.h @@ -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 */ diff --git a/src/bdwgc/include/private/gcconfig.h b/src/bdwgc/include/private/gcconfig.h index 9dfcc06..6fb6765 100644 --- a/src/bdwgc/include/private/gcconfig.h +++ b/src/bdwgc/include/private/gcconfig.h @@ -2577,10 +2577,12 @@ # define GC_EXPLICIT_SIGNALS_UNBLOCK #endif +/* #ifdef GC_NETBSD_THREADS # define SIGRTMIN 33 # define SIGRTMAX 63 #endif +*/ #ifdef GC_OPENBSD_THREADS # include diff --git a/src/bdwgc/pthread_stop_world.c b/src/bdwgc/pthread_stop_world.c index a68e922..db11990 100644 --- a/src/bdwgc/pthread_stop_world.c +++ b/src/bdwgc/pthread_stop_world.c @@ -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