summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-01-23 14:11:20 -0500
committerBen Gamari <ben@smart-cactus.org>2020-01-23 14:11:20 -0500
commit42c2558a4ef2835bae1708d2aeb29148b1b70496 (patch)
treefc5f25cd00becf8ae0e8a61ad713abb0bfcc9e86
parent3dae006fc424e768bb43fc73851a08fefcb732a5 (diff)
downloadhaskell-wip/T15768.tar.gz
base: Use one-shot kqueue on macOSwip/T15768
The underlying reason requiring that one-shot usage be disabled (#13903) has been fixed. Closes #15768.
-rw-r--r--libraries/base/GHC/Event/Manager.hs17
1 files changed, 2 insertions, 15 deletions
diff --git a/libraries/base/GHC/Event/Manager.hs b/libraries/base/GHC/Event/Manager.hs
index eda3e61490..51306795fe 100644
--- a/libraries/base/GHC/Event/Manager.hs
+++ b/libraries/base/GHC/Event/Manager.hs
@@ -150,9 +150,7 @@ callbackTableVar mgr fd = emFds mgr ! hashFd fd
haveOneShot :: Bool
{-# INLINE haveOneShot #-}
-#if defined(darwin_HOST_OS) || defined(ios_HOST_OS)
-haveOneShot = False
-#elif defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
+#if defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
haveOneShot = True
#else
haveOneShot = False
@@ -365,20 +363,9 @@ registerFd mgr cb fd evs lt = do
return r
{-# INLINE registerFd #-}
-{-
- Building GHC with parallel IO manager on Mac freezes when
- compiling the dph libraries in the phase 2. As workaround, we
- don't use oneshot and we wake up an IO manager on Mac every time
- when we register an event.
-
- For more information, please read:
- https://gitlab.haskell.org/ghc/ghc/issues/7651
--}
-- | Wake up the event manager.
wakeManager :: EventManager -> IO ()
-#if defined(darwin_HOST_OS) || defined(ios_HOST_OS)
-wakeManager mgr = sendWakeup (emControl mgr)
-#elif defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
+#if defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
wakeManager _ = return ()
#else
wakeManager mgr = sendWakeup (emControl mgr)