Commit 5186ffc5 authored by kazu-yamamoto's avatar kazu-yamamoto Committed by tibbe

Removing unnecessary trailing spaces.

parent d8b94b38
......@@ -136,7 +136,7 @@ callbackTableVar mgr fd = emFds mgr ! hashFd fd
haveOneShot :: Bool
{-# INLINE haveOneShot #-}
#if defined(darwin_HOST_OS)
haveOneShot = False
haveOneShot = False
#elif defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
haveOneShot = True
#else
......@@ -319,7 +319,7 @@ registerFd mgr cb fd evs = do
-- | Wake up the event manager.
wakeManager :: EventManager -> IO ()
#if defined(darwin_HOST_OS)
wakeManager mgr = sendWakeup (emControl mgr)
wakeManager mgr = sendWakeup (emControl mgr)
#elif defined(HAVE_EPOLL) || defined(HAVE_KQUEUE)
wakeManager _ = return ()
#else
......@@ -377,7 +377,7 @@ closeFd mgr close fd = do
return (newMap, fds)
forM_ fds $ \(FdData reg ev cb) -> cb reg (ev `mappend` evtClose)
-- | Close a file descriptor in a race-safe way.
-- | Close a file descriptor in a race-safe way.
-- It assumes the caller will update the callback tables and that the caller
-- holds the callback table lock for the fd. It must hold this lock because
-- this command executes a backend command on the fd.
......@@ -428,7 +428,7 @@ onFdEvent mgr fd evs =
where
-- nothing to rearm.
aux [] _ [] =
if haveOneShot
if haveOneShot
then return (curmap, cbs)
else do I.modifyFd (emBackend mgr) fd (eventsOf cbs) mempty
return (curmap, cbs)
......@@ -437,7 +437,7 @@ onFdEvent mgr fd evs =
-- callback table for this fd, and we deleted above, so we know there
-- is no entry in the table for this fd.
aux [] fdds saved@(_:_) = do
if haveOneShot
if haveOneShot
then I.modifyFdOnce (emBackend mgr) fd $ eventsOf saved
else I.modifyFd (emBackend mgr) fd (eventsOf cbs) $ eventsOf saved
return (snd $ IM.insertWith (\_ _ -> saved) fd' saved curmap, fdds)
......
......@@ -333,7 +333,7 @@ ioManagerCapabilitiesChanged = do
let old_n_caps = high + 1
if new_n_caps > old_n_caps
then do new_eventManagerArray <- newIOArray (0, new_n_caps - 1) Nothing
-- copy the existing values into the new array:
forM_ [0..high] $ \i -> do
Just (tid,mgr) <- readIOArray eventManagerArray i
......@@ -348,7 +348,7 @@ ioManagerCapabilitiesChanged = do
-- update the event manager array reference:
writeIORef eventManager new_eventManagerArray
else when (new_n_caps > numEnabled) $
else when (new_n_caps > numEnabled) $
forM_ [numEnabled..new_n_caps-1] $ \i -> do
Just (_,mgr) <- readIOArray eventManagerArray i
tid <- restartPollLoop mgr i
......
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