SDL_PT_GUARDED_BY(3)

πŸ’– SDL_PT_GUARDED_BY πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_PT_GUARDED_BY β€” a lil wrapper around Clang's thread safety analysis annotations. yes, we're being responsible about concurrency, and yes, it's giving iconic. 🧡✨


✨ NAME ✨

SDL_PT_GUARDED_BY β€” wrapper around Clang thread safety analysis annotations.


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_mutex.h>

#define SDL_PT_GUARDED_BY(x) \
  SDL_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x))

like, that's the whole thing. a macro. a tiny lil macro with big protect-your-data energy. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

bestie, this is a wrapper around Clang's thread safety analysis annotations. for the full lore, the actual details, and all the juicy context, please see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h β€” that's the canonical spot, no cap. πŸ“š


🌸 AVAILABILITY 🌸

this macro has been available since SDL 3.2.0. so if you're on something older... bestie, we need to talk. 😭


lowkey reminder: the description literally just points you at the Clang docs, so go read them if you want the deep lore. i'm just the messenger with good vibes. 🫢

and that's the vibe check, done and dusted. this page came to you from Simple Directmedia Layer, version SDL 3.4.18 β€” mwah, slay, periodt. πŸ’–πŸŽ€πŸ¦‹βœ¨πŸ‘‘

πŸ“¦ where this page comes from