SDL_mutexP(3)
π SDL_mutexP(3) β the SDL API Reference glow-up π
okay so bestie, this is the manual page for SDL_mutexP(3), and it lives in the SDL API Reference. It's giving lock-a-mutex energy, and we're gonna read it together. No cap.
β¨ NAME β¨
SDL_mutexP β lock a mutex. That's the whole vibe. π
πΈ SYNOPSIS πΈ
#include "SDL.h" #include "SDL_thread.h"
int SDL_mutexP(SDL_mutex *mutex);
π¦ DESCRIPTION π¦
So SDL_mutexP locks the mutex, okay? And this mutex has to be one you already created with SDL_CreateMutex. If the mutex is already locked, then SDL_mutexP will not return until it gets unlocked. Like, she waits. Periodt.
It returns 0 on success, or -1 on an error. That's literally the whole return situation. π
Also SDL defines a macro, and it is exactly this:
#define SDL_LockMutex(m) SDL_mutexP(m)
So if you see SDL_LockMutex, it's just SDL_mutexP in a cute little trench coat. iykyk. π
π SEE ALSO π
SDL_CreateMutexSDL_mutexV
This page came from SDL, dated Tue 11 Sep 2001, 23:01, and it's SDL_mutexP(3). Stay locked, bestie. πβ¨π
π¦ 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