sdlSemPost function

int sdlSemPost(
  1. Pointer<SdlSem> sem
)

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

\param sem the semaphore to increment \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_CreateSemaphore \sa SDL_DestroySemaphore \sa SDL_SemTryWait \sa SDL_SemValue \sa SDL_SemWait \sa SDL_SemWaitTimeout

extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem)

Implementation

int sdlSemPost(Pointer<SdlSem> sem) {
  final sdlSemPostLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlSem> sem),
      int Function(Pointer<SdlSem> sem)>('SDL_SemPost');
  return sdlSemPostLookupFunction(sem);
}