[commit: ghc] ghc-8.0: Revert "rts/posix/Itimer.c: Handle EINTR when reading timerfd" (aabd44c)
git at git.haskell.org
git at git.haskell.org
Thu Apr 21 15:22:26 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/aabd44cbd59dc3018890b3174ac8c181bbc4d19f/ghc
>---------------------------------------------------------------
commit aabd44cbd59dc3018890b3174ac8c181bbc4d19f
Author: Ben Gamari <ben at smart-cactus.org>
Date: Thu Apr 21 13:30:41 2016 +0200
Revert "rts/posix/Itimer.c: Handle EINTR when reading timerfd"
This reverts commit 37936e2b23e58b8a855b7ece5a375b930d1a29bc.
>---------------------------------------------------------------
aabd44cbd59dc3018890b3174ac8c181bbc4d19f
rts/posix/Itimer.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/rts/posix/Itimer.c b/rts/posix/Itimer.c
index 8915446..b833295 100644
--- a/rts/posix/Itimer.c
+++ b/rts/posix/Itimer.c
@@ -202,15 +202,10 @@ static void *itimer_thread_func(void *_handle_tick)
while (1) {
if (USE_TIMERFD_FOR_ITIMER) {
- if (read(timerfd, &nticks, sizeof(nticks)) != sizeof(nticks)) {
- if (errno != EINTR) {
- sysErrorBelch("Itimer: read(timerfd) failed");
- }
- }
+ if (read(timerfd, &nticks, sizeof(nticks)) != sizeof(nticks))
+ sysErrorBelch("Itimer: read(timer_fd) failed");
} else {
- if (usleep(TimeToUS(itimer_interval)) != 0 && errno != EINTR) {
- sysErrorBelch("usleep(TimeToUS(itimer_interval) failed");
- }
+ usleep(TimeToUS(itimer_interval));
}
switch (itimer_state) {
case RUNNING:
@@ -227,7 +222,7 @@ static void *itimer_thread_func(void *_handle_tick)
return NULL;
}
}
- return NULL; // Never reached.
+ return NULL;
}
#endif
More information about the ghc-commits
mailing list