SDL_WaitSemaphore(3)
β¨ NAME β¨
SDL_WaitSemaphore(3) β bestie, this is the SDL3 FUNCTIONS manual page for SDL_WaitSemaphore. It waits until a semaphore has a positive value, then decrements it. Periodt. π
π SYNOPSIS π
#include <SDL3/SDL_mutex.h>
void SDL_WaitSemaphore(SDL_Semaphore *sem);
πΈ DESCRIPTION πΈ
Okay so SDL_WaitSemaphore literally suspends the calling thread until the semaphore pointed to by sem has a positive value, and then it atomically decrements the semaphore value. No cap. β¨
This function is the equivalent of calling SDL_WaitSemaphoreTimeout() with a time length of -1. That's the tea. π«
π FUNCTION PARAMETERS π
semβ the semaphore wait on. that's it, that's the param. π
π THREAD SAFETY π
It is safe to call this function from any thread. So yes bestie, take it anywhere, it's thread-safe. π
β AVAILABILITY β
This function is available since SDL 3.2.0. iconic. π
π SEE ALSO π
okay bye bestie! π this page came from Simple Directmedia Layer, version SDL 3.4.18. the footer doesn't list a date, so I'm not inventing one β mwah π«Ά
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms