summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-10-08 10:07:24 -0400
committerBen Gamari <ben@smart-cactus.org>2022-08-06 11:45:17 -0400
commit7267cd52fb0b06479b9ceea2dc4700d949a1d75b (patch)
tree57fc2e73287b57aa345c8c65efec65c18afef25f
parent57f530d38bf49b4dfc66b1495454d2d80a0c70c8 (diff)
downloadhaskell-7267cd52fb0b06479b9ceea2dc4700d949a1d75b.tar.gz
base: Organize Haddocks in GHC.Conc.Sync
-rw-r--r--libraries/base/GHC/Conc/Sync.hs37
1 files changed, 22 insertions, 15 deletions
diff --git a/libraries/base/GHC/Conc/Sync.hs b/libraries/base/GHC/Conc/Sync.hs
index dbc81e1848..6ae26678aa 100644
--- a/libraries/base/GHC/Conc/Sync.hs
+++ b/libraries/base/GHC/Conc/Sync.hs
@@ -29,34 +29,41 @@
-- #not-home
module GHC.Conc.Sync
- ( ThreadId(..)
+ (
+ -- * Threads
+ ThreadId(..)
, showThreadId
+ , myThreadId
+ , killThread
+ , throwTo
+ , yield
+ , labelThread
+ , mkWeakThreadId
+
+ , ThreadStatus(..), BlockReason(..)
+ , threadStatus
+ , threadCapability
-- * Forking and suchlike
, forkIO
, forkIOWithUnmask
, forkOn
, forkOnWithUnmask
+
+ -- * Capabilities
, numCapabilities
, getNumCapabilities
, setNumCapabilities
, getNumProcessors
+
+ -- * Sparks
, numSparks
, childHandler
- , myThreadId
- , killThread
- , throwTo
, par
, pseq
, runSparks
- , yield
- , labelThread
- , mkWeakThreadId
-
- , ThreadStatus(..), BlockReason(..)
- , threadStatus
- , threadCapability
+ -- * PrimMVar
, newStablePtrPrimMVar, PrimMVar
-- * Allocation counter and quota
@@ -622,10 +629,10 @@ mkWeakThreadId t@(ThreadId t#) = IO $ \s ->
data PrimMVar
--- | Make a StablePtr that can be passed to the C function
--- @hs_try_putmvar()@. The RTS wants a 'StablePtr' to the underlying
--- 'MVar#', but a 'StablePtr#' can only refer to lifted types, so we
--- have to cheat by coercing.
+-- | Make a 'StablePtr' that can be passed to the C function
+-- @hs_try_putmvar()@. The RTS wants a 'StablePtr' to the
+-- underlying 'MVar#', but a 'StablePtr#' can only refer to
+-- lifted types, so we have to cheat by coercing.
newStablePtrPrimMVar :: MVar a -> IO (StablePtr PrimMVar)
newStablePtrPrimMVar (MVar m) = IO $ \s0 ->
case makeStablePtr# (unsafeCoerce# m :: PrimMVar) s0 of