sdlGetAtomicInt function

int sdlGetAtomicInt(
  1. Pointer<SdlAtomicInt> a
)

Get the value of an atomic variable.

Note: If you don't know what this function is for, you shouldn't use it!

\param a a pointer to an SDL_AtomicInt variable. \returns the current value of an atomic variable.

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

\since This function is available since SDL 3.1.3.

\sa SDL_SetAtomicInt

extern SDL_DECLSPEC int SDLCALL SDL_GetAtomicInt(SDL_AtomicInt *a)

Implementation

int sdlGetAtomicInt(Pointer<SdlAtomicInt> a) {
  final sdlGetAtomicIntLookupFunction = libSdl3.lookupFunction<
      Int32 Function(Pointer<SdlAtomicInt> a),
      int Function(Pointer<SdlAtomicInt> a)>('SDL_GetAtomicInt');
  return sdlGetAtomicIntLookupFunction(a);
}