From: simonmar Date: Mon, 11 Oct 2004 10:54:57 +0000 (+0000) Subject: [project @ 2004-10-11 10:54:57 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1512 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0688d49ec633cb4274690de2556638fae1145dc6;p=ghc-hetmet.git [project @ 2004-10-11 10:54:57 by simonmar] genericRaise() hack needed on FreeBSD too. --- diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index 636eff7..09154da 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -297,14 +297,14 @@ heapCheckFail( void ) #endif /* - * It seems that pthreads and signals interact oddly in OpenBSD - * pthreads (and possibly FreeBSD). When linking with -lpthreads, we + * It seems that pthreads and signals interact oddly in OpenBSD & FreeBSD + * pthreads (and possibly others). When linking with -lpthreads, we * have to use pthread_kill to send blockable signals. So use that * when we have a threaded rts. So System.Posix.Signals will call * genericRaise(), rather than raise(3). */ int genericRaise(int sig) { -#if defined(THREADED_RTS) && defined(openbsd_TARGET_OS) +#if defined(THREADED_RTS) && (defined(openbsd_TARGET_OS) || defined(freebsd_TARGET_OS)) return pthread_kill(pthread_self(), sig); #else return raise(sig);