sdlGetAtomicPointer function atomic

Pointer<NativeType> sdlGetAtomicPointer(
  1. Pointer<Pointer<NativeType>> a
)

Get the value of a pointer atomically.

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

\param a a pointer to a pointer. \returns the current value of a pointer.

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

\since This function is available since SDL 3.2.0.

\sa SDL_CompareAndSwapAtomicPointer \sa SDL_SetAtomicPointer

extern SDL_DECLSPEC void * SDLCALL SDL_GetAtomicPointer(void **a)

Implementation

Pointer<NativeType> sdlGetAtomicPointer(Pointer<Pointer<NativeType>> a) {
  final sdlGetAtomicPointerLookupFunction = _libSdl
      .lookupFunction<
        Pointer<NativeType> Function(Pointer<Pointer<NativeType>> a),
        Pointer<NativeType> Function(Pointer<Pointer<NativeType>> a)
      >('SDL_GetAtomicPointer');
  return sdlGetAtomicPointerLookupFunction(a);
}