sdlWaitSemaphore function
Wait until a semaphore has a positive value and then decrements it.
This function suspends the calling thread until the semaphore pointed to by
sem
has a positive value, and then atomically decrement the semaphore
value.
This function is the equivalent of calling SDL_WaitSemaphoreTimeout() with a time length of -1.
\param sem the semaphore wait on.
\since This function is available since SDL 3.1.3.
\sa SDL_SignalSemaphore \sa SDL_TryWaitSemaphore \sa SDL_WaitSemaphoreTimeout
extern SDL_DECLSPEC void SDLCALL SDL_WaitSemaphore(SDL_Semaphore *sem)
Implementation
void sdlWaitSemaphore(Pointer<SdlSemaphore> sem) {
final sdlWaitSemaphoreLookupFunction = libSdl3.lookupFunction<
Void Function(Pointer<SdlSemaphore> sem),
void Function(Pointer<SdlSemaphore> sem)>('SDL_WaitSemaphore');
return sdlWaitSemaphoreLookupFunction(sem);
}