SDL_DestroySemaphore(3)

πŸ’– SDL_DestroySemaphore(3) β€” SDL3 FUNCTIONS πŸ’–

okay bestie, welcome to the SDL_DestroySemaphore(3) page from SDL3 FUNCTIONS. It's giving semaphore cleanup, and we're keeping every detail exactly where it belongs. No cap. πŸ¦‹


✨ NAME ✨

SDL_DestroySemaphore β€” destroy a semaphore. That's the whole main character job. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_mutex.h>

void SDL_DestroySemaphore(SDL_Semaphore *sem);

πŸ’… DESCRIPTION πŸ’…

okay so listen: it is not safe to destroy a semaphore if there are threads currently waiting on it. Like, do not do that. That's the warning, bestie. 😭


🫢 FUNCTION PARAMETERS 🫢

  • sem β€” the semaphore to destroy. That's the one you're sending off into the void. ✨

πŸ”₯ THREAD SAFETY πŸ”₯

good news: it is safe to call this function from any thread. Periodt. πŸ’š


🌸 AVAILABILITY 🌸

this function is available since SDL 3.2.0. If you're on that or newer, you're good. 🫢


πŸ‘‘ SEE ALSO πŸ‘‘


Catch ya later, bestie β€” source/version check: Simple Directmedia Layer, SDL 3.4.18. No date on the footer, but the vibe is immaculate. πŸ’–βœ¨

πŸ“¦ where this page comes from