summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2021-07-13 13:16:17 +0200
committerBen Gamari <ben@well-typed.com>2021-07-25 21:37:26 +0000
commit29ec5324e656f26f861c38288231fc947353013a (patch)
treeb39e7aa5a599e4f35ef460525cd27c2792522763
parentde23fe411f4ed50d32247872dc392de02a446774 (diff)
downloadhaskell-wip/rts_ticker_refac.tar.gz
Use pthread if available on linuxwip/rts_ticker_refac
-rw-r--r--rts/posix/Ticker.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/rts/posix/Ticker.c b/rts/posix/Ticker.c
index 23308b6808..0b2dd25bbd 100644
--- a/rts/posix/Ticker.c
+++ b/rts/posix/Ticker.c
@@ -62,12 +62,12 @@
#endif
/*
- * On Linux in the threaded RTS we can use timerfd_* (introduced in Linux
+ * On Linux we can use timerfd_* (introduced in Linux
* 2.6.25) and a thread instead of alarm signals. It avoids the risk of
* interrupting syscalls (see #10840) and the risk of being accidentally
* modified in user code using signals.
*/
-#if defined(linux_HOST_OS) && defined(THREADED_RTS) && HAVE_SYS_TIMERFD_H
+#if defined(linux_HOST_OS) && HAVE_SYS_TIMERFD_H
#define USE_PTHREAD_FOR_ITIMER
#endif
@@ -101,9 +101,7 @@ ghc-stage2: timer_create: Not owner
#if defined(USE_PTHREAD_FOR_ITIMER)
#include "ticker/Pthread.c"
#elif defined(USE_TIMER_CREATE)
- //#error TimerCreate
#include "ticker/TimerCreate.c"
#else
- //#error Setitimer
#include "ticker/Setitimer.c"
#endif