sdlUnlockSpinlock function

void sdlUnlockSpinlock(
  1. Pointer<Int32> lock
)

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!

\param lock a pointer to a lock variable.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.1.3.

\sa SDL_LockSpinlock \sa SDL_TryLockSpinlock

extern SDL_DECLSPEC void SDLCALL SDL_UnlockSpinlock(SDL_SpinLock *lock)

Implementation

void sdlUnlockSpinlock(Pointer<Int32> lock) {
  final sdlUnlockSpinlockLookupFunction = libSdl3.lookupFunction<
      Void Function(Pointer<Int32> lock),
      void Function(Pointer<Int32> lock)>('SDL_UnlockSpinlock');
  return sdlUnlockSpinlockLookupFunction(lock);
}