SDL_TRY_ACQUIRE_SHARED(3)

okay so bestie, you opened SDL_TRY_ACQUIRE_SHARED(3) from the SDL3 FUNCTIONS section, and it's literally a tiny macro moment. πŸ’…

✨ NAME ✨

SDL_TRY_ACQUIRE_SHARED β€” it's a wrapper around Clang thread safety analysis annotations. That's it. That's the whole job. No cap.

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_mutex.h>

#define SDL_TRY_ACQUIRE_SHARED(x, y) \
  SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(x, y))

🌸 DESCRIPTION 🌸

Bestie, the actual explanation is over here: https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h. Please see that. It's the Clang ThreadSafetyAnalysis docs, mutex-h section. Go get your lore. πŸ“š

πŸ’– AVAILABILITY πŸ’–

This macro is available since SDL 3.2.0 β€” so if your SDL is 3.2.0 or newer, you're good to go. ✨


okay bye bestie 🫢 this page came from Simple Directmedia Layer, version SDL 3.4.18, and the footer tag is SDL_TRY_ACQUIRE_SHARED(3). No date was in the footer, so I'm not inventing one πŸ˜­πŸ’€.

πŸ“¦ where this page comes from