summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-01-23 19:11:20 (GMT)
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-31 07:47:31 (GMT)
commit41117d71bb58e001f6a2b6a11c9314d5b70b9182 (patch)
treeb2752af4c18ce95aceb7961f0f9058e70e19d06f
parent942c714830c73ac40e1c02bff37e2850c6794081 (diff)
downloadghc-41117d71bb58e001f6a2b6a11c9314d5b70b9182.zip
ghc-41117d71bb58e001f6a2b6a11c9314d5b70b9182.tar.gz
ghc-41117d71bb58e001f6a2b6a11c9314d5b70b9182.tar.bz2
base: Use one-shot kqueue on macOS
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 eda3e61..5130679 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)