summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2021-07-13 13:16:17 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-07-27 04:48:26 -0400
commit5457a1249fe0ccaf31d1d96478ce606041b41e9f (patch)
tree9f54f12dffd35518b3eaf2bc8ebaa414349dd053
parent8c5c27f11ea2832fd2870551f4bff22a8faaa87a (diff)
downloadhaskell-5457a1249fe0ccaf31d1d96478ce606041b41e9f.tar.gz
Use pthread if available on linux
-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