Commit d70d452a authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

rts: Use pthread itimer implementation on Darwin

We want to avoid using SIGALRM whenever possible since we will interrupt
long-running system calls. See #10840.

Test Plan: Validate on Darwin

Reviewers: austin, erikd, simonmar

Reviewed By: simonmar

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #10840
parent 9043a400
......@@ -29,6 +29,15 @@
* We want to avoid using the SIGALRM signals whenever possible as these signals
* interrupt system calls (see #10840) and can be overridden by user code. On
* Darwin we can use a dedicated thread and usleep.
#if defined(darwin_HOST_OS)
* On Linux in the threaded RTS we can use timerfd_* (introduced in Linux
* 2.6.25) and a thread instead of alarm signals. It avoids the risk of
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment