sdlSignalSemaphore function mutex

void sdlSignalSemaphore(
  1. Pointer<SdlSemaphore> sem
)

Atomically increment a semaphore's value and wake waiting threads.

\param sem the semaphore to increment.

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

\since This function is available since SDL 3.2.0.

\sa SDL_TryWaitSemaphore \sa SDL_WaitSemaphore \sa SDL_WaitSemaphoreTimeout

extern SDL_DECLSPEC void SDLCALL SDL_SignalSemaphore(SDL_Semaphore *sem)

Implementation

void sdlSignalSemaphore(Pointer<SdlSemaphore> sem) {
  final sdlSignalSemaphoreLookupFunction = _libSdl
      .lookupFunction<
        Void Function(Pointer<SdlSemaphore> sem),
        void Function(Pointer<SdlSemaphore> sem)
      >('SDL_SignalSemaphore');
  return sdlSignalSemaphoreLookupFunction(sem);
}