SDL_EXCLUDES(3)

πŸ’– SDL_EXCLUDES πŸ’–

okay so bestie, welcome to the SDL3 FUNCTIONS manual page for SDL_EXCLUDES β€” and ngl, this one is a lil macro with major "don't touch my mutex" energy. It's literally a wrapper around Clang thread safety analysis annotations. The way that it just delegates to Clang? Iconic. πŸŽ€


🌸 NAME 🌸

SDL_EXCLUDES β€” a wrapper around Clang thread safety analysis annotations. no cap, that's the whole vibe. ✨


✨ SYNOPSIS ✨

#include <SDL3/SDL_mutex.h>

#define SDL_EXCLUDES(x) \
  SDL_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(x))

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, the actual full lore is not here, bestie. The page says please see:

https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h

that's the link. go read it. iykyk. πŸ’œ


πŸ’… AVAILABILITY πŸ’…

This macro is available since SDL 3.2.0. so if you're on anything older, it's giving "not invited to the party." 😭


lowkey reminder: this is just a wrapper, so all the real thread-safety rules live with Clang. don't come for me. 🫢

xoxo, peace out from the Simple Directmedia Layer besties, running SDL 3.4.18, and this has been SDL_EXCLUDES(3) πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from