sdlAtomicSet function

int sdlAtomicSet(
  1. Pointer<SdlAtomicT> a,
  2. int v
)

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!

\param a a pointer to an SDL_atomic_t variable to be modified \param v the desired value \returns the previous value of the atomic variable.

\since This function is available since SDL 2.0.2.

\sa SDL_AtomicGet

extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v)

Implementation

int sdlAtomicSet(Pointer<SdlAtomicT> a, int v) {
  final sdlAtomicSetLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlAtomicT> a, Int32 v),
      int Function(Pointer<SdlAtomicT> a, int v)>('SDL_AtomicSet');
  return sdlAtomicSetLookupFunction(a, v);
}