SDL_CondWait(3)
π SDL_CondWait β like, the SDL API Reference, bestie π
okay so welcome to the SDL API Reference, specifically the page for SDL_CondWait(3), and yes we are gonna get into it π
β¨ NAME β¨
SDL_CondWait β wait on a condition variable π«Ά
πΈ SYNOPSIS πΈ
#include "SDL.h"
#include "SDL_thread.h"
int SDL_CondWait(SDL_cond *cond, SDL_mutex *mut);
π¦ DESCRIPTION π¦
So here's the vibe: you call SDL_CondWait and it waits on the condition variable cond, and it unlocks the mutex you handed it, mut. Two things at once, multitasking queen π
π¨ IMPORTANT: that mutex must be locked before entering this function. Like, locked locked. Do not walk in there with an unlocked mutex, that's not the move, bestie π
When it gets signalled, it returns 0. On an error, it returns -1. That's it, that's the whole deal β¨
π₯ SEE ALSO π₯
SDL_CondWaitTimeoutSDL_CondSignalSDL_mutexP
mwah π this page is brought to you by SDL, dated Tue 11 Sep 2001, 23:00, and it's SDL_CondWait(3) forever and always, periodt ππ
π¦ where this page comes from
- debian bookworm: libsdl1.2-dev 1.2.15+dfsg2-8 Β· LGPL-2.1-or-later
- nixos 26.05: SDL_sixel 0-unstable-2016-02-06
- nixpkgs unstable: SDL_sixel 0-unstable-2016-02-06
- ubuntu jammy: libsdl1.2-dev 1.2.15+dfsg2-6 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms