sdlAtomicLock function

void sdlAtomicLock(
  1. Pointer<Int32> lock
)

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!

\param lock a pointer to a lock variable

\since This function is available since SDL 2.0.0.

\sa SDL_AtomicTryLock \sa SDL_AtomicUnlock

extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock)

Implementation

void sdlAtomicLock(Pointer<Int32> lock) {
  final sdlAtomicLockLookupFunction = libSdl2.lookupFunction<
      Void Function(Pointer<Int32> lock),
      void Function(Pointer<Int32> lock)>('SDL_AtomicLock');
  return sdlAtomicLockLookupFunction(lock);
}