{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}

module SDL3.Sys.Bindgen.Atomic.FunPtr (
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_TryLockSpinlock,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_LockSpinlock,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_UnlockSpinlock,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_MemoryBarrierReleaseFunction,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_MemoryBarrierAcquireFunction,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_CompareAndSwapAtomicInt,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_SetAtomicInt,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_GetAtomicInt,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_AddAtomicInt,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_CompareAndSwapAtomicU32,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_SetAtomicU32,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_GetAtomicU32,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_AddAtomicU32,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_CompareAndSwapAtomicPointer,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_SetAtomicPointer,
  SDL3.Sys.Bindgen.Atomic.FunPtr.sDL_GetAtomicPointer,
)
where

import Prelude (IO, fmap)

import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI qualified
import SDL3.Sys.Bindgen.Atomic
import SDL3.Sys.Bindgen.Stdinc qualified

$( HsBindgen.Runtime.Support.CAPI.addCSource
     ( HsBindgen.Runtime.Support.CAPI.unlines
         [ "#define SDL_MAIN_HANDLED"
         , "#define SDL_SLOW_MEMCPY"
         , "#define SDL_SLOW_MEMMOVE"
         , "#define SDL_SLOW_MEMSET"
         , "#include <SDL3/SDL_atomic.h>"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_TryLockSpinlock */"
         , "__attribute__ ((const))"
         , "_Bool (*hs_bindgen_3653769bf64cd142 (void)) ("
         , "  SDL_SpinLock *arg1"
         , ")"
         , "{"
         , "  return &SDL_TryLockSpinlock;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_LockSpinlock */"
         , "__attribute__ ((const))"
         , "void (*hs_bindgen_192f3ef53748431b (void)) ("
         , "  SDL_SpinLock *arg1"
         , ")"
         , "{"
         , "  return &SDL_LockSpinlock;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_UnlockSpinlock */"
         , "__attribute__ ((const))"
         , "void (*hs_bindgen_da14195ad2b603e0 (void)) ("
         , "  SDL_SpinLock *arg1"
         , ")"
         , "{"
         , "  return &SDL_UnlockSpinlock;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_MemoryBarrierReleaseFunction */"
         , "__attribute__ ((const))"
         , "void (*hs_bindgen_4979d73c1ba41e39 (void)) (void)"
         , "{"
         , "  return &SDL_MemoryBarrierReleaseFunction;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_MemoryBarrierAcquireFunction */"
         , "__attribute__ ((const))"
         , "void (*hs_bindgen_e6cbd7564a024d99 (void)) (void)"
         , "{"
         , "  return &SDL_MemoryBarrierAcquireFunction;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_CompareAndSwapAtomicInt */"
         , "__attribute__ ((const))"
         , "_Bool (*hs_bindgen_c535bda19feaf153 (void)) ("
         , "  SDL_AtomicInt *arg1,"
         , "  signed int arg2,"
         , "  signed int arg3"
         , ")"
         , "{"
         , "  return &SDL_CompareAndSwapAtomicInt;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_SetAtomicInt */"
         , "__attribute__ ((const))"
         , "signed int (*hs_bindgen_281a397e642c4489 (void)) ("
         , "  SDL_AtomicInt *arg1,"
         , "  signed int arg2"
         , ")"
         , "{"
         , "  return &SDL_SetAtomicInt;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_GetAtomicInt */"
         , "__attribute__ ((const))"
         , "signed int (*hs_bindgen_db9688135888e49b (void)) ("
         , "  SDL_AtomicInt *arg1"
         , ")"
         , "{"
         , "  return &SDL_GetAtomicInt;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_AddAtomicInt */"
         , "__attribute__ ((const))"
         , "signed int (*hs_bindgen_3e37f598766ca408 (void)) ("
         , "  SDL_AtomicInt *arg1,"
         , "  signed int arg2"
         , ")"
         , "{"
         , "  return &SDL_AddAtomicInt;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_CompareAndSwapAtomicU32 */"
         , "__attribute__ ((const))"
         , "_Bool (*hs_bindgen_b4be57e876b926c0 (void)) ("
         , "  SDL_AtomicU32 *arg1,"
         , "  Uint32 arg2,"
         , "  Uint32 arg3"
         , ")"
         , "{"
         , "  return &SDL_CompareAndSwapAtomicU32;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_SetAtomicU32 */"
         , "__attribute__ ((const))"
         , "Uint32 (*hs_bindgen_34e65bfeeaed8bb5 (void)) ("
         , "  SDL_AtomicU32 *arg1,"
         , "  Uint32 arg2"
         , ")"
         , "{"
         , "  return &SDL_SetAtomicU32;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_GetAtomicU32 */"
         , "__attribute__ ((const))"
         , "Uint32 (*hs_bindgen_89429d58246e8835 (void)) ("
         , "  SDL_AtomicU32 *arg1"
         , ")"
         , "{"
         , "  return &SDL_GetAtomicU32;"
         , "}"
         , "#include <SDL3/SDL_version.h>"
         , "#include <SDL3/SDL_error.h>"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_AddAtomicU32 */"
         , "__attribute__ ((const))"
         , "Uint32 (*hs_bindgen_74ebd3ff8c83f38e (void)) ("
         , "  SDL_AtomicU32 *arg1,"
         , "  signed int arg2"
         , ")"
         , "{"
         , "#if SDL_VERSION_ATLEAST(3, 4, 0)"
         , "  return &SDL_AddAtomicU32;"
         , "#else"
         , "  SDL_SetError(\"SDL_AddAtomicU32 requires SDL >= 3.4.0\"); return 0;"
         , "#endif"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_CompareAndSwapAtomicPointer */"
         , "__attribute__ ((const))"
         , "_Bool (*hs_bindgen_6871c50a63bfd9f4 (void)) ("
         , "  void **arg1,"
         , "  void *arg2,"
         , "  void *arg3"
         , ")"
         , "{"
         , "  return &SDL_CompareAndSwapAtomicPointer;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_SetAtomicPointer */"
         , "__attribute__ ((const))"
         , "void *(*hs_bindgen_f4bd3696da14dba9 (void)) ("
         , "  void **arg1,"
         , "  void *arg2"
         , ")"
         , "{"
         , "  return &SDL_SetAtomicPointer;"
         , "}"
         , "/* sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_GetAtomicPointer */"
         , "__attribute__ ((const))"
         , "void *(*hs_bindgen_dc36e65ef974254e (void)) ("
         , "  void **arg1"
         , ")"
         , "{"
         , "  return &SDL_GetAtomicPointer;"
         , "}"
         ]
     )
 )

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_TryLockSpinlock@
foreign import ccall unsafe "hs_bindgen_3653769bf64cd142"
  hs_bindgen_3653769bf64cd142_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_TryLockSpinlock@
hs_bindgen_3653769bf64cd142 :: IO (BG.FunPtr (BG.Ptr SDL_SpinLock -> IO BG.CBool))
hs_bindgen_3653769bf64cd142 :: IO (FunPtr (Ptr SDL_SpinLock -> IO CBool))
hs_bindgen_3653769bf64cd142 =
  (FunPtr Void -> FunPtr (Ptr SDL_SpinLock -> IO CBool))
-> IO (FunPtr Void) -> IO (FunPtr (Ptr SDL_SpinLock -> IO CBool))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr SDL_SpinLock -> IO CBool)
FFIType (FunPtr (Ptr SDL_SpinLock -> IO CBool))
-> FunPtr (Ptr SDL_SpinLock -> IO CBool)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_3653769bf64cd142_base

{-# NOINLINE sDL_TryLockSpinlock #-}

-- | Try to lock a spin lock by setting it to a non-zero value.
--
--     /__Please note that spinlocks are dangerous if you don\'t know what you\'re doing. Please be careful using any sort of spinlock!__/
--
--     [@lock@]: a pointer to a lock variable.
--
--     [Returns]: true if the lock succeeded, false if the lock is already held.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_LockSpinlock', 'sDL_UnlockSpinlock'
--
--     [C declaration]: @SDL_TryLockSpinlock@, defined at @SDL3\/SDL_atomic.h 100:34@
sDL_TryLockSpinlock :: BG.FunPtr (BG.Ptr SDL_SpinLock -> IO BG.CBool)
sDL_TryLockSpinlock :: FunPtr (Ptr SDL_SpinLock -> IO CBool)
sDL_TryLockSpinlock =
  IO (FunPtr (Ptr SDL_SpinLock -> IO CBool))
-> FunPtr (Ptr SDL_SpinLock -> IO CBool)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_SpinLock -> IO CBool))
hs_bindgen_3653769bf64cd142

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_LockSpinlock@
foreign import ccall unsafe "hs_bindgen_192f3ef53748431b"
  hs_bindgen_192f3ef53748431b_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_LockSpinlock@
hs_bindgen_192f3ef53748431b :: IO (BG.FunPtr (BG.Ptr SDL_SpinLock -> IO ()))
hs_bindgen_192f3ef53748431b :: IO (FunPtr (Ptr SDL_SpinLock -> IO ()))
hs_bindgen_192f3ef53748431b =
  (FunPtr Void -> FunPtr (Ptr SDL_SpinLock -> IO ()))
-> IO (FunPtr Void) -> IO (FunPtr (Ptr SDL_SpinLock -> IO ()))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr SDL_SpinLock -> IO ())
FFIType (FunPtr (Ptr SDL_SpinLock -> IO ()))
-> FunPtr (Ptr SDL_SpinLock -> IO ())
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_192f3ef53748431b_base

{-# NOINLINE sDL_LockSpinlock #-}

-- | Lock a spin lock by setting it to a non-zero value.
--
--     /__Please note that spinlocks are dangerous if you don\'t know what you\'re doing. Please be careful using any sort of spinlock!__/
--
--     [@lock@]: a pointer to a lock variable.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_TryLockSpinlock', 'sDL_UnlockSpinlock'
--
--     [C declaration]: @SDL_LockSpinlock@, defined at @SDL3\/SDL_atomic.h 117:34@
sDL_LockSpinlock :: BG.FunPtr (BG.Ptr SDL_SpinLock -> IO ())
sDL_LockSpinlock :: FunPtr (Ptr SDL_SpinLock -> IO ())
sDL_LockSpinlock =
  IO (FunPtr (Ptr SDL_SpinLock -> IO ()))
-> FunPtr (Ptr SDL_SpinLock -> IO ())
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_SpinLock -> IO ()))
hs_bindgen_192f3ef53748431b

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_UnlockSpinlock@
foreign import ccall unsafe "hs_bindgen_da14195ad2b603e0"
  hs_bindgen_da14195ad2b603e0_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_UnlockSpinlock@
hs_bindgen_da14195ad2b603e0 :: IO (BG.FunPtr (BG.Ptr SDL_SpinLock -> IO ()))
hs_bindgen_da14195ad2b603e0 :: IO (FunPtr (Ptr SDL_SpinLock -> IO ()))
hs_bindgen_da14195ad2b603e0 =
  (FunPtr Void -> FunPtr (Ptr SDL_SpinLock -> IO ()))
-> IO (FunPtr Void) -> IO (FunPtr (Ptr SDL_SpinLock -> IO ()))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr SDL_SpinLock -> IO ())
FFIType (FunPtr (Ptr SDL_SpinLock -> IO ()))
-> FunPtr (Ptr SDL_SpinLock -> IO ())
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_da14195ad2b603e0_base

{-# NOINLINE sDL_UnlockSpinlock #-}

-- | Unlock a spin lock by setting it to 0.
--
--     Always returns immediately.
--
--     /__Please note that spinlocks are dangerous if you don\'t know what you\'re doing. Please be careful using any sort of spinlock!__/
--
--     [@lock@]: a pointer to a lock variable.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_LockSpinlock', 'sDL_TryLockSpinlock'
--
--     [C declaration]: @SDL_UnlockSpinlock@, defined at @SDL3\/SDL_atomic.h 136:34@
sDL_UnlockSpinlock :: BG.FunPtr (BG.Ptr SDL_SpinLock -> IO ())
sDL_UnlockSpinlock :: FunPtr (Ptr SDL_SpinLock -> IO ())
sDL_UnlockSpinlock =
  IO (FunPtr (Ptr SDL_SpinLock -> IO ()))
-> FunPtr (Ptr SDL_SpinLock -> IO ())
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_SpinLock -> IO ()))
hs_bindgen_da14195ad2b603e0

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_MemoryBarrierReleaseFunction@
foreign import ccall unsafe "hs_bindgen_4979d73c1ba41e39"
  hs_bindgen_4979d73c1ba41e39_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_MemoryBarrierReleaseFunction@
hs_bindgen_4979d73c1ba41e39 :: IO (BG.FunPtr (IO ()))
hs_bindgen_4979d73c1ba41e39 :: IO (FunPtr (IO ()))
hs_bindgen_4979d73c1ba41e39 =
  (FunPtr Void -> FunPtr (IO ()))
-> IO (FunPtr Void) -> IO (FunPtr (IO ()))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (IO ())
FFIType (FunPtr (IO ())) -> FunPtr (IO ())
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_4979d73c1ba41e39_base

{-# NOINLINE sDL_MemoryBarrierReleaseFunction #-}

-- | Insert a memory release barrier (function version).
--
--     Please refer to SDL_MemoryBarrierRelease for details. This is a function version, which might be useful if you need to use this functionality from a scripting language, etc. Also, some of the macro versions call this function behind the scenes, where more heavy lifting can happen inside of SDL. Generally, though, an app written in C\/C++\/etc should use the macro version, as it will be more efficient.
--
--     [Thread safety]: Obviously this function is safe to use from any thread at any time, but if you find yourself needing this, you are probably dealing with some very sensitive code; be careful!
--
--     @since 3.2.0
--
--     [See also]: @SDL_MemoryBarrierRelease@
--
--     [C declaration]: @SDL_MemoryBarrierReleaseFunction@, defined at @SDL3\/SDL_atomic.h 195:34@
sDL_MemoryBarrierReleaseFunction :: BG.FunPtr (IO ())
sDL_MemoryBarrierReleaseFunction :: FunPtr (IO ())
sDL_MemoryBarrierReleaseFunction =
  IO (FunPtr (IO ())) -> FunPtr (IO ())
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (IO ()))
hs_bindgen_4979d73c1ba41e39

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_MemoryBarrierAcquireFunction@
foreign import ccall unsafe "hs_bindgen_e6cbd7564a024d99"
  hs_bindgen_e6cbd7564a024d99_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_MemoryBarrierAcquireFunction@
hs_bindgen_e6cbd7564a024d99 :: IO (BG.FunPtr (IO ()))
hs_bindgen_e6cbd7564a024d99 :: IO (FunPtr (IO ()))
hs_bindgen_e6cbd7564a024d99 =
  (FunPtr Void -> FunPtr (IO ()))
-> IO (FunPtr Void) -> IO (FunPtr (IO ()))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (IO ())
FFIType (FunPtr (IO ())) -> FunPtr (IO ())
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_e6cbd7564a024d99_base

{-# NOINLINE sDL_MemoryBarrierAcquireFunction #-}

-- | Insert a memory acquire barrier (function version).
--
--     Please refer to SDL_MemoryBarrierRelease for details. This is a function version, which might be useful if you need to use this functionality from a scripting language, etc. Also, some of the macro versions call this function behind the scenes, where more heavy lifting can happen inside of SDL. Generally, though, an app written in C\/C++\/etc should use the macro version, as it will be more efficient.
--
--     [Thread safety]: Obviously this function is safe to use from any thread at any time, but if you find yourself needing this, you are probably dealing with some very sensitive code; be careful!
--
--     @since 3.2.0
--
--     [See also]: @SDL_MemoryBarrierAcquire@
--
--     [C declaration]: @SDL_MemoryBarrierAcquireFunction@, defined at @SDL3\/SDL_atomic.h 215:34@
sDL_MemoryBarrierAcquireFunction :: BG.FunPtr (IO ())
sDL_MemoryBarrierAcquireFunction :: FunPtr (IO ())
sDL_MemoryBarrierAcquireFunction =
  IO (FunPtr (IO ())) -> FunPtr (IO ())
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (IO ()))
hs_bindgen_e6cbd7564a024d99

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_CompareAndSwapAtomicInt@
foreign import ccall unsafe "hs_bindgen_c535bda19feaf153"
  hs_bindgen_c535bda19feaf153_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_CompareAndSwapAtomicInt@
hs_bindgen_c535bda19feaf153
  :: IO (BG.FunPtr (BG.Ptr SDL_AtomicInt -> BG.CInt -> BG.CInt -> IO BG.CBool))
hs_bindgen_c535bda19feaf153 :: IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> CInt -> IO CBool))
hs_bindgen_c535bda19feaf153 =
  (FunPtr Void
 -> FunPtr (Ptr SDL_AtomicInt -> CInt -> CInt -> IO CBool))
-> IO (FunPtr Void)
-> IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> CInt -> IO CBool))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void
-> FunPtr (Ptr SDL_AtomicInt -> CInt -> CInt -> IO CBool)
FFIType (FunPtr (Ptr SDL_AtomicInt -> CInt -> CInt -> IO CBool))
-> FunPtr (Ptr SDL_AtomicInt -> CInt -> CInt -> IO CBool)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_c535bda19feaf153_base

{-# NOINLINE sDL_CompareAndSwapAtomicInt #-}

-- | Set an atomic variable to a new value if it is currently an old value.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to an 'SDL_AtomicInt' variable to be modified.
--
--     [@oldval@]: the old value.
--
--     [@newval@]: the new value.
--
--     [Returns]: true if the atomic variable was set, false otherwise.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_GetAtomicInt', 'sDL_SetAtomicInt'
--
--     [C declaration]: @SDL_CompareAndSwapAtomicInt@, defined at @SDL3\/SDL_atomic.h 425:34@
sDL_CompareAndSwapAtomicInt :: BG.FunPtr (BG.Ptr SDL_AtomicInt -> BG.CInt -> BG.CInt -> IO BG.CBool)
sDL_CompareAndSwapAtomicInt :: FunPtr (Ptr SDL_AtomicInt -> CInt -> CInt -> IO CBool)
sDL_CompareAndSwapAtomicInt =
  IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> CInt -> IO CBool))
-> FunPtr (Ptr SDL_AtomicInt -> CInt -> CInt -> IO CBool)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> CInt -> IO CBool))
hs_bindgen_c535bda19feaf153

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_SetAtomicInt@
foreign import ccall unsafe "hs_bindgen_281a397e642c4489"
  hs_bindgen_281a397e642c4489_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_SetAtomicInt@
hs_bindgen_281a397e642c4489 :: IO (BG.FunPtr (BG.Ptr SDL_AtomicInt -> BG.CInt -> IO BG.CInt))
hs_bindgen_281a397e642c4489 :: IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
hs_bindgen_281a397e642c4489 =
  (FunPtr Void -> FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
-> IO (FunPtr Void)
-> IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt)
FFIType (FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
-> FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_281a397e642c4489_base

{-# NOINLINE sDL_SetAtomicInt #-}

-- | Set an atomic variable to a value.
--
--     This function also acts as a full memory barrier.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to an 'SDL_AtomicInt' variable to be modified.
--
--     [@v@]: the desired value.
--
--     [Returns]: the previous value of the atomic variable.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_GetAtomicInt'
--
--     [C declaration]: @SDL_SetAtomicInt@, defined at @SDL3\/SDL_atomic.h 445:33@
sDL_SetAtomicInt :: BG.FunPtr (BG.Ptr SDL_AtomicInt -> BG.CInt -> IO BG.CInt)
sDL_SetAtomicInt :: FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt)
sDL_SetAtomicInt =
  IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
-> FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
hs_bindgen_281a397e642c4489

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_GetAtomicInt@
foreign import ccall unsafe "hs_bindgen_db9688135888e49b"
  hs_bindgen_db9688135888e49b_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_GetAtomicInt@
hs_bindgen_db9688135888e49b :: IO (BG.FunPtr (BG.Ptr SDL_AtomicInt -> IO BG.CInt))
hs_bindgen_db9688135888e49b :: IO (FunPtr (Ptr SDL_AtomicInt -> IO CInt))
hs_bindgen_db9688135888e49b =
  (FunPtr Void -> FunPtr (Ptr SDL_AtomicInt -> IO CInt))
-> IO (FunPtr Void) -> IO (FunPtr (Ptr SDL_AtomicInt -> IO CInt))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr SDL_AtomicInt -> IO CInt)
FFIType (FunPtr (Ptr SDL_AtomicInt -> IO CInt))
-> FunPtr (Ptr SDL_AtomicInt -> IO CInt)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_db9688135888e49b_base

{-# NOINLINE sDL_GetAtomicInt #-}

-- | Get the value of an atomic variable.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to an 'SDL_AtomicInt' variable.
--
--     [Returns]: the current value of an atomic variable.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_SetAtomicInt'
--
--     [C declaration]: @SDL_GetAtomicInt@, defined at @SDL3\/SDL_atomic.h 462:33@
sDL_GetAtomicInt :: BG.FunPtr (BG.Ptr SDL_AtomicInt -> IO BG.CInt)
sDL_GetAtomicInt :: FunPtr (Ptr SDL_AtomicInt -> IO CInt)
sDL_GetAtomicInt =
  IO (FunPtr (Ptr SDL_AtomicInt -> IO CInt))
-> FunPtr (Ptr SDL_AtomicInt -> IO CInt)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_AtomicInt -> IO CInt))
hs_bindgen_db9688135888e49b

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_AddAtomicInt@
foreign import ccall unsafe "hs_bindgen_3e37f598766ca408"
  hs_bindgen_3e37f598766ca408_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_AddAtomicInt@
hs_bindgen_3e37f598766ca408 :: IO (BG.FunPtr (BG.Ptr SDL_AtomicInt -> BG.CInt -> IO BG.CInt))
hs_bindgen_3e37f598766ca408 :: IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
hs_bindgen_3e37f598766ca408 =
  (FunPtr Void -> FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
-> IO (FunPtr Void)
-> IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt)
FFIType (FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
-> FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_3e37f598766ca408_base

{-# NOINLINE sDL_AddAtomicInt #-}

-- | Add to an atomic variable.
--
--     This function also acts as a full memory barrier.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to an 'SDL_AtomicInt' variable to be modified.
--
--     [@v@]: the desired value to add.
--
--     [Returns]: the previous value of the atomic variable.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: @SDL_AtomicDecRef@, @SDL_AtomicIncRef@
--
--     [C declaration]: @SDL_AddAtomicInt@, defined at @SDL3\/SDL_atomic.h 483:33@
sDL_AddAtomicInt :: BG.FunPtr (BG.Ptr SDL_AtomicInt -> BG.CInt -> IO BG.CInt)
sDL_AddAtomicInt :: FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt)
sDL_AddAtomicInt =
  IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
-> FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_AtomicInt -> CInt -> IO CInt))
hs_bindgen_3e37f598766ca408

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_CompareAndSwapAtomicU32@
foreign import ccall unsafe "hs_bindgen_b4be57e876b926c0"
  hs_bindgen_b4be57e876b926c0_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_CompareAndSwapAtomicU32@
hs_bindgen_b4be57e876b926c0
  :: IO
       ( BG.FunPtr
           ( BG.Ptr SDL_AtomicU32
             -> SDL3.Sys.Bindgen.Stdinc.Uint32
             -> SDL3.Sys.Bindgen.Stdinc.Uint32
             -> IO BG.CBool
           )
       )
hs_bindgen_b4be57e876b926c0 :: IO (FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> Uint32 -> IO CBool))
hs_bindgen_b4be57e876b926c0 =
  (FunPtr Void
 -> FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> Uint32 -> IO CBool))
-> IO (FunPtr Void)
-> IO (FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> Uint32 -> IO CBool))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void
-> FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> Uint32 -> IO CBool)
FFIType
  (FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> Uint32 -> IO CBool))
-> FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> Uint32 -> IO CBool)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_b4be57e876b926c0_base

{-# NOINLINE sDL_CompareAndSwapAtomicU32 #-}

-- | Set an atomic variable to a new value if it is currently an old value.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to an 'SDL_AtomicU32' variable to be modified.
--
--     [@oldval@]: the old value.
--
--     [@newval@]: the new value.
--
--     [Returns]: true if the atomic variable was set, false otherwise.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_GetAtomicU32', 'sDL_SetAtomicU32'
--
--     [C declaration]: @SDL_CompareAndSwapAtomicU32@, defined at @SDL3\/SDL_atomic.h 570:34@
sDL_CompareAndSwapAtomicU32
  :: BG.FunPtr
       ( BG.Ptr SDL_AtomicU32
         -> SDL3.Sys.Bindgen.Stdinc.Uint32
         -> SDL3.Sys.Bindgen.Stdinc.Uint32
         -> IO BG.CBool
       )
sDL_CompareAndSwapAtomicU32 :: FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> Uint32 -> IO CBool)
sDL_CompareAndSwapAtomicU32 =
  IO (FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> Uint32 -> IO CBool))
-> FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> Uint32 -> IO CBool)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> Uint32 -> IO CBool))
hs_bindgen_b4be57e876b926c0

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_SetAtomicU32@
foreign import ccall unsafe "hs_bindgen_34e65bfeeaed8bb5"
  hs_bindgen_34e65bfeeaed8bb5_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_SetAtomicU32@
hs_bindgen_34e65bfeeaed8bb5
  :: IO
       ( BG.FunPtr
           (BG.Ptr SDL_AtomicU32 -> SDL3.Sys.Bindgen.Stdinc.Uint32 -> IO SDL3.Sys.Bindgen.Stdinc.Uint32)
       )
hs_bindgen_34e65bfeeaed8bb5 :: IO (FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> IO Uint32))
hs_bindgen_34e65bfeeaed8bb5 =
  (FunPtr Void -> FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> IO Uint32))
-> IO (FunPtr Void)
-> IO (FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> IO Uint32))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> IO Uint32)
FFIType (FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> IO Uint32))
-> FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> IO Uint32)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_34e65bfeeaed8bb5_base

{-# NOINLINE sDL_SetAtomicU32 #-}

-- | Set an atomic variable to a value.
--
--     This function also acts as a full memory barrier.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to an 'SDL_AtomicU32' variable to be modified.
--
--     [@v@]: the desired value.
--
--     [Returns]: the previous value of the atomic variable.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_GetAtomicU32'
--
--     [C declaration]: @SDL_SetAtomicU32@, defined at @SDL3\/SDL_atomic.h 590:36@
sDL_SetAtomicU32
  :: BG.FunPtr
       (BG.Ptr SDL_AtomicU32 -> SDL3.Sys.Bindgen.Stdinc.Uint32 -> IO SDL3.Sys.Bindgen.Stdinc.Uint32)
sDL_SetAtomicU32 :: FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> IO Uint32)
sDL_SetAtomicU32 =
  IO (FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> IO Uint32))
-> FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> IO Uint32)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_AtomicU32 -> Uint32 -> IO Uint32))
hs_bindgen_34e65bfeeaed8bb5

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_GetAtomicU32@
foreign import ccall unsafe "hs_bindgen_89429d58246e8835"
  hs_bindgen_89429d58246e8835_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_GetAtomicU32@
hs_bindgen_89429d58246e8835
  :: IO (BG.FunPtr (BG.Ptr SDL_AtomicU32 -> IO SDL3.Sys.Bindgen.Stdinc.Uint32))
hs_bindgen_89429d58246e8835 :: IO (FunPtr (Ptr SDL_AtomicU32 -> IO Uint32))
hs_bindgen_89429d58246e8835 =
  (FunPtr Void -> FunPtr (Ptr SDL_AtomicU32 -> IO Uint32))
-> IO (FunPtr Void) -> IO (FunPtr (Ptr SDL_AtomicU32 -> IO Uint32))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr SDL_AtomicU32 -> IO Uint32)
FFIType (FunPtr (Ptr SDL_AtomicU32 -> IO Uint32))
-> FunPtr (Ptr SDL_AtomicU32 -> IO Uint32)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_89429d58246e8835_base

{-# NOINLINE sDL_GetAtomicU32 #-}

-- | Get the value of an atomic variable.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to an 'SDL_AtomicU32' variable.
--
--     [Returns]: the current value of an atomic variable.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_SetAtomicU32'
--
--     [C declaration]: @SDL_GetAtomicU32@, defined at @SDL3\/SDL_atomic.h 607:36@
sDL_GetAtomicU32 :: BG.FunPtr (BG.Ptr SDL_AtomicU32 -> IO SDL3.Sys.Bindgen.Stdinc.Uint32)
sDL_GetAtomicU32 :: FunPtr (Ptr SDL_AtomicU32 -> IO Uint32)
sDL_GetAtomicU32 =
  IO (FunPtr (Ptr SDL_AtomicU32 -> IO Uint32))
-> FunPtr (Ptr SDL_AtomicU32 -> IO Uint32)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_AtomicU32 -> IO Uint32))
hs_bindgen_89429d58246e8835

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_AddAtomicU32@
foreign import ccall unsafe "hs_bindgen_74ebd3ff8c83f38e"
  hs_bindgen_74ebd3ff8c83f38e_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_AddAtomicU32@
hs_bindgen_74ebd3ff8c83f38e
  :: IO (BG.FunPtr (BG.Ptr SDL_AtomicU32 -> BG.CInt -> IO SDL3.Sys.Bindgen.Stdinc.Uint32))
hs_bindgen_74ebd3ff8c83f38e :: IO (FunPtr (Ptr SDL_AtomicU32 -> CInt -> IO Uint32))
hs_bindgen_74ebd3ff8c83f38e =
  (FunPtr Void -> FunPtr (Ptr SDL_AtomicU32 -> CInt -> IO Uint32))
-> IO (FunPtr Void)
-> IO (FunPtr (Ptr SDL_AtomicU32 -> CInt -> IO Uint32))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr SDL_AtomicU32 -> CInt -> IO Uint32)
FFIType (FunPtr (Ptr SDL_AtomicU32 -> CInt -> IO Uint32))
-> FunPtr (Ptr SDL_AtomicU32 -> CInt -> IO Uint32)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_74ebd3ff8c83f38e_base

{-# NOINLINE sDL_AddAtomicU32 #-}

-- | Add to an atomic variable.
--
--     This function also acts as a full memory barrier.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to an 'SDL_AtomicU32' variable to be modified.
--
--     [@v@]: the desired value to add or subtract.
--
--     [Returns]: the previous value of the atomic variable.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.4.0
--
--     [C declaration]: @SDL_AddAtomicU32@, defined at @SDL3\/SDL_atomic.h 625:36@
sDL_AddAtomicU32 :: BG.FunPtr (BG.Ptr SDL_AtomicU32 -> BG.CInt -> IO SDL3.Sys.Bindgen.Stdinc.Uint32)
sDL_AddAtomicU32 :: FunPtr (Ptr SDL_AtomicU32 -> CInt -> IO Uint32)
sDL_AddAtomicU32 =
  IO (FunPtr (Ptr SDL_AtomicU32 -> CInt -> IO Uint32))
-> FunPtr (Ptr SDL_AtomicU32 -> CInt -> IO Uint32)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr SDL_AtomicU32 -> CInt -> IO Uint32))
hs_bindgen_74ebd3ff8c83f38e

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_CompareAndSwapAtomicPointer@
foreign import ccall unsafe "hs_bindgen_6871c50a63bfd9f4"
  hs_bindgen_6871c50a63bfd9f4_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_CompareAndSwapAtomicPointer@
hs_bindgen_6871c50a63bfd9f4
  :: IO (BG.FunPtr (BG.Ptr (BG.Ptr BG.Void) -> BG.Ptr BG.Void -> BG.Ptr BG.Void -> IO BG.CBool))
hs_bindgen_6871c50a63bfd9f4 :: IO (FunPtr (Ptr (Ptr Void) -> Ptr Void -> Ptr Void -> IO CBool))
hs_bindgen_6871c50a63bfd9f4 =
  (FunPtr Void
 -> FunPtr (Ptr (Ptr Void) -> Ptr Void -> Ptr Void -> IO CBool))
-> IO (FunPtr Void)
-> IO (FunPtr (Ptr (Ptr Void) -> Ptr Void -> Ptr Void -> IO CBool))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void
-> FunPtr (Ptr (Ptr Void) -> Ptr Void -> Ptr Void -> IO CBool)
FFIType
  (FunPtr (Ptr (Ptr Void) -> Ptr Void -> Ptr Void -> IO CBool))
-> FunPtr (Ptr (Ptr Void) -> Ptr Void -> Ptr Void -> IO CBool)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_6871c50a63bfd9f4_base

{-# NOINLINE sDL_CompareAndSwapAtomicPointer #-}

-- | Set a pointer to a new value if it is currently an old value.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to a pointer.
--
--     [@oldval@]: the old pointer value.
--
--     [@newval@]: the new pointer value.
--
--     [Returns]: true if the pointer was set, false otherwise.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_CompareAndSwapAtomicInt', 'sDL_GetAtomicPointer', 'sDL_SetAtomicPointer'
--
--     [C declaration]: @SDL_CompareAndSwapAtomicPointer@, defined at @SDL3\/SDL_atomic.h 646:34@
sDL_CompareAndSwapAtomicPointer
  :: BG.FunPtr (BG.Ptr (BG.Ptr BG.Void) -> BG.Ptr BG.Void -> BG.Ptr BG.Void -> IO BG.CBool)
sDL_CompareAndSwapAtomicPointer :: FunPtr (Ptr (Ptr Void) -> Ptr Void -> Ptr Void -> IO CBool)
sDL_CompareAndSwapAtomicPointer =
  IO (FunPtr (Ptr (Ptr Void) -> Ptr Void -> Ptr Void -> IO CBool))
-> FunPtr (Ptr (Ptr Void) -> Ptr Void -> Ptr Void -> IO CBool)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr (Ptr Void) -> Ptr Void -> Ptr Void -> IO CBool))
hs_bindgen_6871c50a63bfd9f4

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_SetAtomicPointer@
foreign import ccall unsafe "hs_bindgen_f4bd3696da14dba9"
  hs_bindgen_f4bd3696da14dba9_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_SetAtomicPointer@
hs_bindgen_f4bd3696da14dba9
  :: IO (BG.FunPtr (BG.Ptr (BG.Ptr BG.Void) -> BG.Ptr BG.Void -> IO (BG.Ptr BG.Void)))
hs_bindgen_f4bd3696da14dba9 :: IO (FunPtr (Ptr (Ptr Void) -> Ptr Void -> IO (Ptr Void)))
hs_bindgen_f4bd3696da14dba9 =
  (FunPtr Void
 -> FunPtr (Ptr (Ptr Void) -> Ptr Void -> IO (Ptr Void)))
-> IO (FunPtr Void)
-> IO (FunPtr (Ptr (Ptr Void) -> Ptr Void -> IO (Ptr Void)))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr (Ptr Void) -> Ptr Void -> IO (Ptr Void))
FFIType (FunPtr (Ptr (Ptr Void) -> Ptr Void -> IO (Ptr Void)))
-> FunPtr (Ptr (Ptr Void) -> Ptr Void -> IO (Ptr Void))
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_f4bd3696da14dba9_base

{-# NOINLINE sDL_SetAtomicPointer #-}

-- | Set a pointer to a value atomically.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to a pointer.
--
--     [@v@]: the desired pointer value.
--
--     [Returns]: the previous value of the pointer.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_CompareAndSwapAtomicPointer', 'sDL_GetAtomicPointer'
--
--     [C declaration]: @SDL_SetAtomicPointer@, defined at @SDL3\/SDL_atomic.h 665:36@
sDL_SetAtomicPointer :: BG.FunPtr (BG.Ptr (BG.Ptr BG.Void) -> BG.Ptr BG.Void -> IO (BG.Ptr BG.Void))
sDL_SetAtomicPointer :: FunPtr (Ptr (Ptr Void) -> Ptr Void -> IO (Ptr Void))
sDL_SetAtomicPointer =
  IO (FunPtr (Ptr (Ptr Void) -> Ptr Void -> IO (Ptr Void)))
-> FunPtr (Ptr (Ptr Void) -> Ptr Void -> IO (Ptr Void))
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr (Ptr Void) -> Ptr Void -> IO (Ptr Void)))
hs_bindgen_f4bd3696da14dba9

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_GetAtomicPointer@
foreign import ccall unsafe "hs_bindgen_dc36e65ef974254e"
  hs_bindgen_dc36e65ef974254e_base
    :: IO (BG.FunPtr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Atomic_get_SDL_GetAtomicPointer@
hs_bindgen_dc36e65ef974254e :: IO (BG.FunPtr (BG.Ptr (BG.Ptr BG.Void) -> IO (BG.Ptr BG.Void)))
hs_bindgen_dc36e65ef974254e :: IO (FunPtr (Ptr (Ptr Void) -> IO (Ptr Void)))
hs_bindgen_dc36e65ef974254e =
  (FunPtr Void -> FunPtr (Ptr (Ptr Void) -> IO (Ptr Void)))
-> IO (FunPtr Void)
-> IO (FunPtr (Ptr (Ptr Void) -> IO (Ptr Void)))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr (Ptr Void) -> IO (Ptr Void))
FFIType (FunPtr (Ptr (Ptr Void) -> IO (Ptr Void)))
-> FunPtr (Ptr (Ptr Void) -> IO (Ptr Void))
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_dc36e65ef974254e_base

{-# NOINLINE sDL_GetAtomicPointer #-}

-- | Get the value of a pointer atomically.
--
--     /__Note: If you don\'t know what this function is for, you shouldn\'t use it!__/
--
--     [@a@]: a pointer to a pointer.
--
--     [Returns]: the current value of a pointer.
--
--     [Thread safety]: It is safe to call this function from any thread.
--
--     @since 3.2.0
--
--     [See also]: 'sDL_CompareAndSwapAtomicPointer', 'sDL_SetAtomicPointer'
--
--     [C declaration]: @SDL_GetAtomicPointer@, defined at @SDL3\/SDL_atomic.h 683:36@
sDL_GetAtomicPointer :: BG.FunPtr (BG.Ptr (BG.Ptr BG.Void) -> IO (BG.Ptr BG.Void))
sDL_GetAtomicPointer :: FunPtr (Ptr (Ptr Void) -> IO (Ptr Void))
sDL_GetAtomicPointer =
  IO (FunPtr (Ptr (Ptr Void) -> IO (Ptr Void)))
-> FunPtr (Ptr (Ptr Void) -> IO (Ptr Void))
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr (Ptr Void) -> IO (Ptr Void)))
hs_bindgen_dc36e65ef974254e