SDL_ACQUIRED_BEFORE(3)
π SDL_ACQUIRED_BEFORE π
okay bestie so you're in the SDL3 FUNCTIONS section of the manual, and this lil macro right here is the whole vibe check for your locks πβ¨
πΈ NAME πΈ
SDL_ACQUIRED_BEFORE β it's a wrapper around Clang thread safety analysis annotations. that's it. that's the whole job. she's small but she's iconic π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_mutex.h>
#define SDL_ACQUIRED_BEFORE(x) \
SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(x))
look at her. three lines. no notes. π«Ά
π¦ DESCRIPTION π¦
ngl this page is short because the actual lore lives somewhere else β you gotta go read it here:
https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h
fr fr, that link is the main character here, this manpage is just the little sign pointing at her π go read it, iykyk ππ
π AVAILABILITY π
this macro has been around since SDL 3.2.0 β so if you're on anything older, sorry bestie, she's not there yet π
that's the whole page, no cap. source is Simple Directmedia Layer, version SDL 3.4.18 β ty for coming to my ted talk, go annotate your mutexes and slay ππ¦π
π¦ 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