sdlDestroySemaphore function mutex

void sdlDestroySemaphore(
  1. Pointer<SdlSemaphore> sem
)

Destroy a semaphore.

It is not safe to destroy a semaphore if there are threads currently waiting on it.

\param sem the semaphore to destroy.

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

\since This function is available since SDL 3.2.0.

\sa SDL_CreateSemaphore

extern SDL_DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_Semaphore *sem)

Implementation

void sdlDestroySemaphore(Pointer<SdlSemaphore> sem) {
  final sdlDestroySemaphoreLookupFunction = _libSdl
      .lookupFunction<
        Void Function(Pointer<SdlSemaphore> sem),
        void Function(Pointer<SdlSemaphore> sem)
      >('SDL_DestroySemaphore');
  return sdlDestroySemaphoreLookupFunction(sem);
}