Function SDL_WaitSemaphore

pub unsafe extern "C" fn SDL_WaitSemaphore(sem: *mut SDL_Semaphore)
Available on crate feature dep_sdl3 only.
Expand description

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.

§Parameters

  • sem: the semaphore wait on.

§Availability

This function is available since SDL 3.2.0.

§See also