| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Thread
Description
SDL offers cross-platform thread management functions. These are mostly concerned with starting threads, setting their priority, and dealing with their termination.
In addition, there is support for Thread Local Storage (data that is unique to each thread, but accessed from a single key).
On platforms without thread support (such as Emscripten when built without pthreads), these functions still exist, but things like SDL_CreateThread() will report failure without doing anything.
If you're going to work with threads, you almost certainly need to have a good understanding of thread safety measures: locking and synchronization mechanisms are handled by the functions in SDL_mutex.h. The SDL thread object.
These are opaque data.
- See also
SDL_CreateThread,sDL_WaitThread
Since: 3.2.0
Synopsis
- data SDL_Thread
- newtype SDL_ThreadID = SDL_ThreadID {}
- newtype SDL_TLSID = SDL_TLSID {}
- newtype SDL_ThreadPriority = SDL_ThreadPriority {}
- pattern SDL_THREAD_PRIORITY_LOW :: SDL_ThreadPriority
- pattern SDL_THREAD_PRIORITY_NORMAL :: SDL_ThreadPriority
- pattern SDL_THREAD_PRIORITY_HIGH :: SDL_ThreadPriority
- pattern SDL_THREAD_PRIORITY_TIME_CRITICAL :: SDL_ThreadPriority
- newtype SDL_ThreadState = SDL_ThreadState {}
- pattern SDL_THREAD_UNKNOWN :: SDL_ThreadState
- pattern SDL_THREAD_ALIVE :: SDL_ThreadState
- pattern SDL_THREAD_DETACHED :: SDL_ThreadState
- pattern SDL_THREAD_COMPLETE :: SDL_ThreadState
- newtype SDL_ThreadFunction_Aux = SDL_ThreadFunction_Aux {}
- newtype SDL_ThreadFunction = SDL_ThreadFunction {}
- sDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER :: ByteString
- sDL_PROP_THREAD_CREATE_NAME_STRING :: ByteString
- sDL_PROP_THREAD_CREATE_USERDATA_POINTER :: ByteString
- sDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER :: ByteString
- newtype SDL_TLSDestructorCallback_Aux = SDL_TLSDestructorCallback_Aux {}
- newtype SDL_TLSDestructorCallback = SDL_TLSDestructorCallback {}
Documentation
data SDL_Thread Source #
- C declaration
struct SDL_Thread, defined atSDL3/SDL_thread.h 71:16
newtype SDL_ThreadID Source #
A unique numeric ID that identifies a thread.
These are different from SDL_Thread objects, which are generally what an application will operate on, but having a way to uniquely identify a thread can be useful at times.
- See also
sDL_GetThreadID,sDL_GetCurrentThreadID- C declaration
SDL_ThreadID, defined atSDL3/SDL_thread.h 85:16
Since: 3.2.0
Constructors
| SDL_ThreadID | |
Instances
Thread local storage ID.
0 is the invalid ID. An app can create these and then set data for these IDs that is unique to each thread.
- See also
sDL_GetTLS,sDL_SetTLS- C declaration
SDL_TLSID, defined atSDL3/SDL_thread.h 98:23
Since: 3.2.0
Constructors
| SDL_TLSID | |
Fields | |
Instances
| Storable SDL_TLSID Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| Generic SDL_TLSID Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
| |||||
| Show SDL_TLSID Source # | |||||
| Eq SDL_TLSID Source # | |||||
| ReadRaw SDL_TLSID Source # | |||||
| StaticSize SDL_TLSID Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| WriteRaw SDL_TLSID Source # | |||||
| HasCField SDL_TLSID "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
| |||||
| ty ~ SDL_AtomicInt => HasField "unwrap" SDL_TLSID ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| ty ~ SDL_AtomicInt => HasField "unwrap" (Ptr SDL_TLSID) (Ptr ty :: Type) Source # | |||||
| type Rep SDL_TLSID Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread type Rep SDL_TLSID = D1 ('MetaData "SDL_TLSID" "SDL3.Sys.Bindgen.Thread" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_TLSID" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SDL_AtomicInt))) | |||||
| type CFieldType SDL_TLSID "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
newtype SDL_ThreadPriority Source #
The SDL thread priority.
SDL will make system changes as necessary in order to apply the thread priority. Code which attempts to control thread state related to priority should be aware that calling SDL_SetCurrentThreadPriority may alter such state. SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of this behavior.
- C declaration
enum SDL_ThreadPriority, defined atSDL3/SDL_thread.h 111:14
Since: 3.2.0
Constructors
| SDL_ThreadPriority | |
Instances
| Storable SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods sizeOf :: SDL_ThreadPriority -> Int # alignment :: SDL_ThreadPriority -> Int # peekElemOff :: Ptr SDL_ThreadPriority -> Int -> IO SDL_ThreadPriority # pokeElemOff :: Ptr SDL_ThreadPriority -> Int -> SDL_ThreadPriority -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_ThreadPriority # pokeByteOff :: Ptr b -> Int -> SDL_ThreadPriority -> IO () # peek :: Ptr SDL_ThreadPriority -> IO SDL_ThreadPriority # poke :: Ptr SDL_ThreadPriority -> SDL_ThreadPriority -> IO () # | |||||
| Generic SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
Methods from :: SDL_ThreadPriority -> Rep SDL_ThreadPriority x # to :: Rep SDL_ThreadPriority x -> SDL_ThreadPriority # | |||||
| Read SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods readsPrec :: Int -> ReadS SDL_ThreadPriority # readList :: ReadS [SDL_ThreadPriority] # | |||||
| Show SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods showsPrec :: Int -> SDL_ThreadPriority -> ShowS # show :: SDL_ThreadPriority -> String # showList :: [SDL_ThreadPriority] -> ShowS # | |||||
| Eq SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods (==) :: SDL_ThreadPriority -> SDL_ThreadPriority -> Bool # (/=) :: SDL_ThreadPriority -> SDL_ThreadPriority -> Bool # | |||||
| Ord SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods compare :: SDL_ThreadPriority -> SDL_ThreadPriority -> Ordering # (<) :: SDL_ThreadPriority -> SDL_ThreadPriority -> Bool # (<=) :: SDL_ThreadPriority -> SDL_ThreadPriority -> Bool # (>) :: SDL_ThreadPriority -> SDL_ThreadPriority -> Bool # (>=) :: SDL_ThreadPriority -> SDL_ThreadPriority -> Bool # max :: SDL_ThreadPriority -> SDL_ThreadPriority -> SDL_ThreadPriority # min :: SDL_ThreadPriority -> SDL_ThreadPriority -> SDL_ThreadPriority # | |||||
| Prim SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods sizeOfType# :: Proxy SDL_ThreadPriority -> Int# # sizeOf# :: SDL_ThreadPriority -> Int# # alignmentOfType# :: Proxy SDL_ThreadPriority -> Int# # alignment# :: SDL_ThreadPriority -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_ThreadPriority # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_ThreadPriority #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_ThreadPriority -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_ThreadPriority -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_ThreadPriority # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_ThreadPriority #) # writeOffAddr# :: Addr# -> Int# -> SDL_ThreadPriority -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_ThreadPriority -> State# s -> State# s # | |||||
| CEnum SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
Methods toCEnum :: CEnumZ SDL_ThreadPriority -> SDL_ThreadPriority # fromCEnum :: SDL_ThreadPriority -> CEnumZ SDL_ThreadPriority # declaredValues :: proxy SDL_ThreadPriority -> DeclaredValues SDL_ThreadPriority # showsUndeclared :: proxy SDL_ThreadPriority -> Int -> CEnumZ SDL_ThreadPriority -> ShowS # readPrecUndeclared :: ReadPrec SDL_ThreadPriority # isDeclared :: SDL_ThreadPriority -> Bool # mkDeclared :: CEnumZ SDL_ThreadPriority -> Maybe SDL_ThreadPriority # | |||||
| SequentialCEnum SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| HasFFIType SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
Methods toFFIType :: SDL_ThreadPriority -> FFIType SDL_ThreadPriority # fromFFIType :: FFIType SDL_ThreadPriority -> SDL_ThreadPriority # | |||||
| ReadRaw SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods readRaw :: Ptr SDL_ThreadPriority -> IO SDL_ThreadPriority # | |||||
| StaticSize SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods staticSizeOf :: Proxy SDL_ThreadPriority -> Int # | |||||
| WriteRaw SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods writeRaw :: Ptr SDL_ThreadPriority -> SDL_ThreadPriority -> IO () # | |||||
| HasCField SDL_ThreadPriority "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_ThreadPriority ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods hasField :: SDL_ThreadPriority -> (ty -> SDL_ThreadPriority, ty) # | |||||
| ty ~ CUInt => HasField "unwrap" (Ptr SDL_ThreadPriority) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods getField :: Ptr SDL_ThreadPriority -> Ptr ty # | |||||
| type Rep SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread type Rep SDL_ThreadPriority = D1 ('MetaData "SDL_ThreadPriority" "SDL3.Sys.Bindgen.Thread" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_ThreadPriority" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt))) | |||||
| type CEnumZ SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| type FFIType SDL_ThreadPriority Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| type CFieldType SDL_ThreadPriority "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
pattern SDL_THREAD_PRIORITY_LOW :: SDL_ThreadPriority Source #
- C declaration
SDL_THREAD_PRIORITY_LOW, defined atSDL3/SDL_thread.h 112:5
pattern SDL_THREAD_PRIORITY_NORMAL :: SDL_ThreadPriority Source #
- C declaration
SDL_THREAD_PRIORITY_NORMAL, defined atSDL3/SDL_thread.h 113:5
pattern SDL_THREAD_PRIORITY_HIGH :: SDL_ThreadPriority Source #
- C declaration
SDL_THREAD_PRIORITY_HIGH, defined atSDL3/SDL_thread.h 114:5
pattern SDL_THREAD_PRIORITY_TIME_CRITICAL :: SDL_ThreadPriority Source #
- C declaration
SDL_THREAD_PRIORITY_TIME_CRITICAL, defined atSDL3/SDL_thread.h 115:5
newtype SDL_ThreadState Source #
The SDL thread state.
The current state of a thread can be checked by calling SDL_GetThreadState.
- See also
sDL_GetThreadState- C declaration
enum SDL_ThreadState, defined atSDL3/SDL_thread.h 127:14
Since: 3.2.0
Constructors
| SDL_ThreadState | |
Instances
| Storable SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods sizeOf :: SDL_ThreadState -> Int # alignment :: SDL_ThreadState -> Int # peekElemOff :: Ptr SDL_ThreadState -> Int -> IO SDL_ThreadState # pokeElemOff :: Ptr SDL_ThreadState -> Int -> SDL_ThreadState -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_ThreadState # pokeByteOff :: Ptr b -> Int -> SDL_ThreadState -> IO () # peek :: Ptr SDL_ThreadState -> IO SDL_ThreadState # poke :: Ptr SDL_ThreadState -> SDL_ThreadState -> IO () # | |||||
| Generic SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
Methods from :: SDL_ThreadState -> Rep SDL_ThreadState x # to :: Rep SDL_ThreadState x -> SDL_ThreadState # | |||||
| Read SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods readsPrec :: Int -> ReadS SDL_ThreadState # readList :: ReadS [SDL_ThreadState] # | |||||
| Show SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods showsPrec :: Int -> SDL_ThreadState -> ShowS # show :: SDL_ThreadState -> String # showList :: [SDL_ThreadState] -> ShowS # | |||||
| Eq SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods (==) :: SDL_ThreadState -> SDL_ThreadState -> Bool # (/=) :: SDL_ThreadState -> SDL_ThreadState -> Bool # | |||||
| Ord SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods compare :: SDL_ThreadState -> SDL_ThreadState -> Ordering # (<) :: SDL_ThreadState -> SDL_ThreadState -> Bool # (<=) :: SDL_ThreadState -> SDL_ThreadState -> Bool # (>) :: SDL_ThreadState -> SDL_ThreadState -> Bool # (>=) :: SDL_ThreadState -> SDL_ThreadState -> Bool # max :: SDL_ThreadState -> SDL_ThreadState -> SDL_ThreadState # min :: SDL_ThreadState -> SDL_ThreadState -> SDL_ThreadState # | |||||
| Prim SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods sizeOfType# :: Proxy SDL_ThreadState -> Int# # sizeOf# :: SDL_ThreadState -> Int# # alignmentOfType# :: Proxy SDL_ThreadState -> Int# # alignment# :: SDL_ThreadState -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_ThreadState # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_ThreadState #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_ThreadState -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_ThreadState -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_ThreadState # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_ThreadState #) # writeOffAddr# :: Addr# -> Int# -> SDL_ThreadState -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_ThreadState -> State# s -> State# s # | |||||
| CEnum SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
Methods toCEnum :: CEnumZ SDL_ThreadState -> SDL_ThreadState # fromCEnum :: SDL_ThreadState -> CEnumZ SDL_ThreadState # declaredValues :: proxy SDL_ThreadState -> DeclaredValues SDL_ThreadState # showsUndeclared :: proxy SDL_ThreadState -> Int -> CEnumZ SDL_ThreadState -> ShowS # readPrecUndeclared :: ReadPrec SDL_ThreadState # isDeclared :: SDL_ThreadState -> Bool # mkDeclared :: CEnumZ SDL_ThreadState -> Maybe SDL_ThreadState # | |||||
| SequentialCEnum SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| HasFFIType SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
Methods | |||||
| ReadRaw SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods readRaw :: Ptr SDL_ThreadState -> IO SDL_ThreadState # | |||||
| StaticSize SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods staticSizeOf :: Proxy SDL_ThreadState -> Int # staticAlignment :: Proxy SDL_ThreadState -> Int # | |||||
| WriteRaw SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods writeRaw :: Ptr SDL_ThreadState -> SDL_ThreadState -> IO () # | |||||
| HasCField SDL_ThreadState "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_ThreadState ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods hasField :: SDL_ThreadState -> (ty -> SDL_ThreadState, ty) # | |||||
| ty ~ CUInt => HasField "unwrap" (Ptr SDL_ThreadState) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods getField :: Ptr SDL_ThreadState -> Ptr ty # | |||||
| type Rep SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread type Rep SDL_ThreadState = D1 ('MetaData "SDL_ThreadState" "SDL3.Sys.Bindgen.Thread" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_ThreadState" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt))) | |||||
| type CEnumZ SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| type FFIType SDL_ThreadState Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| type CFieldType SDL_ThreadState "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
pattern SDL_THREAD_UNKNOWN :: SDL_ThreadState Source #
The thread is not valid
- C declaration
SDL_THREAD_UNKNOWN, defined atSDL3/SDL_thread.h 129:5
pattern SDL_THREAD_ALIVE :: SDL_ThreadState Source #
The thread is currently running
- C declaration
SDL_THREAD_ALIVE, defined atSDL3/SDL_thread.h 130:5
pattern SDL_THREAD_DETACHED :: SDL_ThreadState Source #
The thread is detached and can't be waited on
- C declaration
SDL_THREAD_DETACHED, defined atSDL3/SDL_thread.h 131:5
pattern SDL_THREAD_COMPLETE :: SDL_ThreadState Source #
The thread has finished and should be cleaned up with SDL_WaitThread()
- C declaration
SDL_THREAD_COMPLETE, defined atSDL3/SDL_thread.h 132:5
newtype SDL_ThreadFunction_Aux Source #
Auxiliary type used by SDL_ThreadFunction
- C declaration
SDL_ThreadFunction, defined atSDL3/SDL_thread.h 143:23
Instances
| Generic SDL_ThreadFunction_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
Methods from :: SDL_ThreadFunction_Aux -> Rep SDL_ThreadFunction_Aux x # to :: Rep SDL_ThreadFunction_Aux x -> SDL_ThreadFunction_Aux # | |||||
| FromFunPtr SDL_ThreadFunction_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods fromFunPtr :: FunPtr SDL_ThreadFunction_Aux -> SDL_ThreadFunction_Aux # | |||||
| ToFunPtr SDL_ThreadFunction_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods toFunPtr :: SDL_ThreadFunction_Aux -> IO (FunPtr SDL_ThreadFunction_Aux) # | |||||
| HasCField SDL_ThreadFunction_Aux "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
| |||||
| ty ~ (Ptr Void -> IO CInt) => HasField "unwrap" SDL_ThreadFunction_Aux ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods hasField :: SDL_ThreadFunction_Aux -> (ty -> SDL_ThreadFunction_Aux, ty) # | |||||
| ty ~ (Ptr Void -> IO CInt) => HasField "unwrap" (Ptr SDL_ThreadFunction_Aux) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods getField :: Ptr SDL_ThreadFunction_Aux -> Ptr ty # | |||||
| type Rep SDL_ThreadFunction_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread type Rep SDL_ThreadFunction_Aux = D1 ('MetaData "SDL_ThreadFunction_Aux" "SDL3.Sys.Bindgen.Thread" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_ThreadFunction_Aux" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ptr Void -> IO CInt)))) | |||||
| type CFieldType SDL_ThreadFunction_Aux "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
newtype SDL_ThreadFunction Source #
The function passed to SDL_CreateThread() as the new thread's entry point.
data- what was passed as
datatoSDL_CreateThread(). - Returns
- a value that can be reported through
SDL_WaitThread(). - C declaration
SDL_ThreadFunction, defined atSDL3/SDL_thread.h 143:23
Since: 3.2.0
Constructors
| SDL_ThreadFunction | |
Fields | |
Instances
| Storable SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods sizeOf :: SDL_ThreadFunction -> Int # alignment :: SDL_ThreadFunction -> Int # peekElemOff :: Ptr SDL_ThreadFunction -> Int -> IO SDL_ThreadFunction # pokeElemOff :: Ptr SDL_ThreadFunction -> Int -> SDL_ThreadFunction -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_ThreadFunction # pokeByteOff :: Ptr b -> Int -> SDL_ThreadFunction -> IO () # peek :: Ptr SDL_ThreadFunction -> IO SDL_ThreadFunction # poke :: Ptr SDL_ThreadFunction -> SDL_ThreadFunction -> IO () # | |||||
| Generic SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
Methods from :: SDL_ThreadFunction -> Rep SDL_ThreadFunction x # to :: Rep SDL_ThreadFunction x -> SDL_ThreadFunction # | |||||
| Show SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods showsPrec :: Int -> SDL_ThreadFunction -> ShowS # show :: SDL_ThreadFunction -> String # showList :: [SDL_ThreadFunction] -> ShowS # | |||||
| Eq SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods (==) :: SDL_ThreadFunction -> SDL_ThreadFunction -> Bool # (/=) :: SDL_ThreadFunction -> SDL_ThreadFunction -> Bool # | |||||
| Ord SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods compare :: SDL_ThreadFunction -> SDL_ThreadFunction -> Ordering # (<) :: SDL_ThreadFunction -> SDL_ThreadFunction -> Bool # (<=) :: SDL_ThreadFunction -> SDL_ThreadFunction -> Bool # (>) :: SDL_ThreadFunction -> SDL_ThreadFunction -> Bool # (>=) :: SDL_ThreadFunction -> SDL_ThreadFunction -> Bool # max :: SDL_ThreadFunction -> SDL_ThreadFunction -> SDL_ThreadFunction # min :: SDL_ThreadFunction -> SDL_ThreadFunction -> SDL_ThreadFunction # | |||||
| HasFFIType SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
Methods toFFIType :: SDL_ThreadFunction -> FFIType SDL_ThreadFunction # fromFFIType :: FFIType SDL_ThreadFunction -> SDL_ThreadFunction # | |||||
| ReadRaw SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods readRaw :: Ptr SDL_ThreadFunction -> IO SDL_ThreadFunction # | |||||
| StaticSize SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods staticSizeOf :: Proxy SDL_ThreadFunction -> Int # | |||||
| WriteRaw SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods writeRaw :: Ptr SDL_ThreadFunction -> SDL_ThreadFunction -> IO () # | |||||
| HasCField SDL_ThreadFunction "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
| |||||
| ty ~ FunPtr SDL_ThreadFunction_Aux => HasField "unwrap" SDL_ThreadFunction ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods hasField :: SDL_ThreadFunction -> (ty -> SDL_ThreadFunction, ty) # | |||||
| ty ~ FunPtr SDL_ThreadFunction_Aux => HasField "unwrap" (Ptr SDL_ThreadFunction) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods getField :: Ptr SDL_ThreadFunction -> Ptr ty # | |||||
| type Rep SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread type Rep SDL_ThreadFunction = D1 ('MetaData "SDL_ThreadFunction" "SDL3.Sys.Bindgen.Thread" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_ThreadFunction" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FunPtr SDL_ThreadFunction_Aux)))) | |||||
| type FFIType SDL_ThreadFunction Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| type CFieldType SDL_ThreadFunction "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
sDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER :: ByteString Source #
- C declaration
macro SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER, literal"SDL.thread.create.entry_function", defined atSDL3/SDL_thread.h 360:9
sDL_PROP_THREAD_CREATE_NAME_STRING :: ByteString Source #
- C declaration
macro SDL_PROP_THREAD_CREATE_NAME_STRING, literal"SDL.thread.create.name", defined atSDL3/SDL_thread.h 361:9
sDL_PROP_THREAD_CREATE_USERDATA_POINTER :: ByteString Source #
- C declaration
macro SDL_PROP_THREAD_CREATE_USERDATA_POINTER, literal"SDL.thread.create.userdata", defined atSDL3/SDL_thread.h 362:9
sDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER :: ByteString Source #
- C declaration
macro SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER, literal"SDL.thread.create.stacksize", defined atSDL3/SDL_thread.h 363:9
newtype SDL_TLSDestructorCallback_Aux Source #
Auxiliary type used by SDL_TLSDestructorCallback
- C declaration
SDL_TLSDestructorCallback, defined atSDL3/SDL_thread.h 553:24
Constructors
| SDL_TLSDestructorCallback_Aux | |
Instances
| Generic SDL_TLSDestructorCallback_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
| |||||
| FromFunPtr SDL_TLSDestructorCallback_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| ToFunPtr SDL_TLSDestructorCallback_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods toFunPtr :: SDL_TLSDestructorCallback_Aux -> IO (FunPtr SDL_TLSDestructorCallback_Aux) # | |||||
| HasCField SDL_TLSDestructorCallback_Aux "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
| |||||
| ty ~ (Ptr Void -> IO ()) => HasField "unwrap" SDL_TLSDestructorCallback_Aux ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods hasField :: SDL_TLSDestructorCallback_Aux -> (ty -> SDL_TLSDestructorCallback_Aux, ty) # | |||||
| ty ~ (Ptr Void -> IO ()) => HasField "unwrap" (Ptr SDL_TLSDestructorCallback_Aux) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods getField :: Ptr SDL_TLSDestructorCallback_Aux -> Ptr ty # | |||||
| type Rep SDL_TLSDestructorCallback_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread type Rep SDL_TLSDestructorCallback_Aux = D1 ('MetaData "SDL_TLSDestructorCallback_Aux" "SDL3.Sys.Bindgen.Thread" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_TLSDestructorCallback_Aux" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ptr Void -> IO ())))) | |||||
| type CFieldType SDL_TLSDestructorCallback_Aux "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
newtype SDL_TLSDestructorCallback Source #
The callback used to cleanup data passed to SDL_SetTLS.
This is called when a thread exits, to allow an app to free any resources.
value- a pointer previously handed to SDL_SetTLS.
- See also
sDL_SetTLS- C declaration
SDL_TLSDestructorCallback, defined atSDL3/SDL_thread.h 553:24
Since: 3.2.0
Constructors
| SDL_TLSDestructorCallback | |
Fields | |
Instances
| Storable SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods sizeOf :: SDL_TLSDestructorCallback -> Int # alignment :: SDL_TLSDestructorCallback -> Int # peekElemOff :: Ptr SDL_TLSDestructorCallback -> Int -> IO SDL_TLSDestructorCallback # pokeElemOff :: Ptr SDL_TLSDestructorCallback -> Int -> SDL_TLSDestructorCallback -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_TLSDestructorCallback # pokeByteOff :: Ptr b -> Int -> SDL_TLSDestructorCallback -> IO () # peek :: Ptr SDL_TLSDestructorCallback -> IO SDL_TLSDestructorCallback # poke :: Ptr SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> IO () # | |||||
| Generic SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
Methods from :: SDL_TLSDestructorCallback -> Rep SDL_TLSDestructorCallback x # to :: Rep SDL_TLSDestructorCallback x -> SDL_TLSDestructorCallback # | |||||
| Show SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods showsPrec :: Int -> SDL_TLSDestructorCallback -> ShowS # show :: SDL_TLSDestructorCallback -> String # showList :: [SDL_TLSDestructorCallback] -> ShowS # | |||||
| Eq SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods (==) :: SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> Bool # (/=) :: SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> Bool # | |||||
| Ord SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods compare :: SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> Ordering # (<) :: SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> Bool # (<=) :: SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> Bool # (>) :: SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> Bool # (>=) :: SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> Bool # max :: SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback # min :: SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback # | |||||
| HasFFIType SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
| |||||
| ReadRaw SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods readRaw :: Ptr SDL_TLSDestructorCallback -> IO SDL_TLSDestructorCallback # | |||||
| StaticSize SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods | |||||
| WriteRaw SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods writeRaw :: Ptr SDL_TLSDestructorCallback -> SDL_TLSDestructorCallback -> IO () # | |||||
| HasCField SDL_TLSDestructorCallback "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Associated Types
| |||||
| ty ~ FunPtr SDL_TLSDestructorCallback_Aux => HasField "unwrap" SDL_TLSDestructorCallback ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods hasField :: SDL_TLSDestructorCallback -> (ty -> SDL_TLSDestructorCallback, ty) # | |||||
| ty ~ FunPtr SDL_TLSDestructorCallback_Aux => HasField "unwrap" (Ptr SDL_TLSDestructorCallback) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread Methods getField :: Ptr SDL_TLSDestructorCallback -> Ptr ty # | |||||
| type Rep SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread type Rep SDL_TLSDestructorCallback = D1 ('MetaData "SDL_TLSDestructorCallback" "SDL3.Sys.Bindgen.Thread" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_TLSDestructorCallback" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FunPtr SDL_TLSDestructorCallback_Aux)))) | |||||
| type FFIType SDL_TLSDestructorCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||
| type CFieldType SDL_TLSDestructorCallback "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Thread | |||||