From e99de7b063cd6791d3f25bc087828c6968beb4d0 Mon Sep 17 00:00:00 2001 From: Andreas Klebinger Date: Tue, 13 Jul 2021 13:16:17 +0200 Subject: Use pthread if available on linux --- rts/posix/Ticker.c | 6 ++---- 1 file 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 -- cgit v1.2.1