summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/Conc
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base/GHC/Conc')
-rw-r--r--libraries/base/GHC/Conc/Sync.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/libraries/base/GHC/Conc/Sync.hs b/libraries/base/GHC/Conc/Sync.hs
index b587da0785..9041850573 100644
--- a/libraries/base/GHC/Conc/Sync.hs
+++ b/libraries/base/GHC/Conc/Sync.hs
@@ -412,7 +412,7 @@ real_handler se
| Just BlockedIndefinitelyOnMVar <- fromException se = return ()
| Just BlockedIndefinitelyOnSTM <- fromException se = return ()
| Just ThreadKilled <- fromException se = return ()
- | Just StackOverflow <- fromException se = reportStackOverflow
+ | Just (StackOverflow' num_words)<- fromException se = reportStackOverflow num_words
| otherwise = reportError se
{- | 'killThread' raises the 'ThreadKilled' exception in the given
@@ -938,10 +938,11 @@ sharedCAF a get_or_set =
else do freeStablePtr stable_ref
deRefStablePtr (castPtrToStablePtr (castPtr ref2))
-reportStackOverflow :: IO ()
-reportStackOverflow = do
- ThreadId tid <- myThreadId
- c_reportStackOverflow tid
+{- | @since TODO
+-}
+reportStackOverflow :: Word# -> IO ()
+reportStackOverflow stack_size =
+ c_reportStackOverflow stack_size
reportError :: SomeException -> IO ()
reportError ex = do
@@ -951,7 +952,7 @@ reportError ex = do
-- SUP: Are the hooks allowed to re-enter Haskell land? If so, remove
-- the unsafe below.
foreign import ccall unsafe "reportStackOverflow"
- c_reportStackOverflow :: ThreadId# -> IO ()
+ c_reportStackOverflow :: Word# -> IO ()
foreign import ccall unsafe "reportHeapOverflow"
reportHeapOverflow :: IO ()