-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Bindings for the pthread library. -- -- Bindings for the pthread library. @package pthread @version 0.1.2 -- | Bindings to the POSIX threads library. -- -- Requires linking with the -threaded RTS. module System.Posix.Thread -- | Create a new thread. create :: IO (Ptr a) -> IO ThreadId -- | Like create, but with an IO computation that returns -- nothing. create_ :: IO () -> IO ThreadId -- | Create a new thread. createWithAttributes :: AttributesMonoid -> IO (Ptr a) -> IO ThreadId -- | Like createWithAttributes, but with an IO computation -- that returns nothing. createWithAttributes_ :: AttributesMonoid -> IO () -> IO ThreadId -- | Terminate calling thread. exit :: Ptr a -> IO () -- | Like exit, but don't return anything. exit_ :: IO () -- | Send a cancellation request to a thread. cancel :: ThreadId -> IO () -- | Join with a terminated thread. join :: ThreadId -> IO (Ptr a) -- | Detach a thread. detach :: ThreadId -> IO () -- | Obtain ID of the calling thread. myThreadId :: IO ThreadId -- | Thread attributes. data Attributes Attributes :: DetachState -> CSize -> InheritSched -> SchedParam -> SchedPolicy -> Scope -> Ptr () -> CSize -> Attributes [$sel:detachState:Attributes] :: Attributes -> DetachState [$sel:guardSize:Attributes] :: Attributes -> CSize [$sel:inheritSched:Attributes] :: Attributes -> InheritSched [$sel:schedParam:Attributes] :: Attributes -> SchedParam [$sel:schedPolicy:Attributes] :: Attributes -> SchedPolicy [$sel:scope:Attributes] :: Attributes -> Scope [$sel:stack:Attributes] :: Attributes -> Ptr () [$sel:stackSize:Attributes] :: Attributes -> CSize -- | Partial set of thread attributes. Think of it as a diff to apply to -- the default attributes object. data AttributesMonoid AttributesMonoid :: First DetachState -> First CSize -> First InheritSched -> First SchedParam -> First SchedPolicy -> First Scope -> First (Ptr ()) -> First CSize -> AttributesMonoid [$sel:detachState:AttributesMonoid] :: AttributesMonoid -> First DetachState [$sel:guardSize:AttributesMonoid] :: AttributesMonoid -> First CSize [$sel:inheritSched:AttributesMonoid] :: AttributesMonoid -> First InheritSched [$sel:schedParam:AttributesMonoid] :: AttributesMonoid -> First SchedParam [$sel:schedPolicy:AttributesMonoid] :: AttributesMonoid -> First SchedPolicy [$sel:scope:AttributesMonoid] :: AttributesMonoid -> First Scope [$sel:stack:AttributesMonoid] :: AttributesMonoid -> First (Ptr ()) [$sel:stackSize:AttributesMonoid] :: AttributesMonoid -> First CSize -- | Opaque objects used to locate thread-specific data. data Key -- | Thread-specific data key creation. createKey :: FunPtr (Ptr a -> IO ()) -> IO Key -- | Like createKey, but with no finalizer. createKey_ :: IO Key -- | Thread-specific data key deletion. deleteKey :: Key -> IO () -- | Associate a thread-specific value with a key obtained -- via a previous call to createKey. setSpecific :: Key -> Ptr a -> IO () -- | Return the value currently bound to the specified key on behalf of the -- calling thread. getSpecific :: Key -> IO (Ptr a) instance Foreign.Storable.Storable System.Posix.Thread.Key instance GHC.Show.Show System.Posix.Thread.Key instance GHC.Classes.Ord System.Posix.Thread.Key instance GHC.Classes.Eq System.Posix.Thread.Key instance GHC.Show.Show System.Posix.Thread.AttributesMonoid instance GHC.Generics.Generic System.Posix.Thread.AttributesMonoid instance GHC.Show.Show System.Posix.Thread.Attributes instance GHC.Generics.Generic System.Posix.Thread.Attributes instance GHC.Show.Show System.Posix.Thread.Scope instance GHC.Classes.Eq System.Posix.Thread.Scope instance GHC.Show.Show System.Posix.Thread.SchedPolicy instance GHC.Classes.Eq System.Posix.Thread.SchedPolicy instance GHC.Show.Show System.Posix.Thread.SchedParam instance GHC.Classes.Eq System.Posix.Thread.SchedParam instance GHC.Show.Show System.Posix.Thread.InheritSched instance GHC.Classes.Eq System.Posix.Thread.InheritSched instance GHC.Show.Show System.Posix.Thread.DetachState instance GHC.Classes.Eq System.Posix.Thread.DetachState instance Foreign.Storable.Storable System.Posix.Thread.ThreadId instance GHC.Show.Show System.Posix.Thread.ThreadId instance GHC.Classes.Ord System.Posix.Thread.ThreadId instance GHC.Classes.Eq System.Posix.Thread.ThreadId instance GHC.Exception.Type.Exception System.Posix.Thread.ThreadNotBound instance GHC.Show.Show System.Posix.Thread.ThreadNotBound instance GHC.Base.Semigroup System.Posix.Thread.AttributesMonoid instance GHC.Base.Monoid System.Posix.Thread.AttributesMonoid instance Foreign.Storable.Storable System.Posix.Thread.AttributesMonoid instance Foreign.Storable.Storable System.Posix.Thread.Attributes instance GHC.Enum.Enum System.Posix.Thread.Scope instance GHC.Enum.Enum System.Posix.Thread.SchedPolicy instance Foreign.Storable.Storable System.Posix.Thread.SchedParam instance GHC.Enum.Enum System.Posix.Thread.InheritSched instance GHC.Enum.Enum System.Posix.Thread.DetachState