diff options
author | Viktor Dukhovni <ietf-dane@dukhovni.org> | 2019-11-10 23:43:55 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-11-19 11:54:45 -0500 |
commit | ec8a463d1ff948ba9b1b0fbb538f7d5a237bf44a (patch) | |
tree | cc355f47dd5ff0ce7fb35240ec547e04cde26fd5 | |
parent | 08d595c026f0774c51d85cbd790518055970ff2d (diff) | |
download | haskell-ec8a463d1ff948ba9b1b0fbb538f7d5a237bf44a.tar.gz |
Enable USE_PTHREAD_FOR_ITIMER also on FreeBSD
If using a pthread instead of a timer signal is more reliable, and
has no known drawbacks, then FreeBSD is also capable of supporting
this mode of operation (tested on FreeBSD 12 with GHC 8.8.1, but
no reason why it would not also work on FreeBSD 11 or GHC 8.6).
Proposed by Kevin Zhang in:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241849
-rw-r--r-- | rts/posix/Itimer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rts/posix/Itimer.c b/rts/posix/Itimer.c index 59d34be5fb..e889cdfad9 100644 --- a/rts/posix/Itimer.c +++ b/rts/posix/Itimer.c @@ -48,6 +48,9 @@ #define USE_PTHREAD_FOR_ITIMER #endif +#if defined(freebsd_HOST_OS) && defined(THREADED_RTS) +#define USE_PTHREAD_FOR_ITIMER +#endif #if defined(solaris2_HOST_OS) /* USE_TIMER_CREATE is usually disabled for Solaris. In fact it is |