SDL_LockSpinlock - Man Page

Lock a spin lock by setting it to a non-zero value.

Synopsis

#include <SDL3/SDL_atomic.h>

void SDL_LockSpinlock(SDL_SpinLock *lock);

Description

Please note that spinlocks are dangerous if you don't know what you're doing. Please be careful using any sort of spinlock!

Function Parameters

lock

a pointer to a lock variable.

Thread Safety

It is safe to call this function from any thread.

Availability

This function is available since SDL 3.2.0.

See Also

SDL_TryLockSpinlock(3), SDL_UnlockSpinlock(3)

Referenced By

SDL_TryLockSpinlock(3), SDL_UnlockSpinlock(3).

SDL 3.2.16 Simple Directmedia Layer SDL3 FUNCTIONS