SDL_AtomicIncRef(3)
πΈ NAME πΈ
SDL_AtomicIncRef - Increment an atomic variable used as a reference count.
okay so this is an SDL3 FUNCTIONS page, and it's giving tiny macro, big atomic energy. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_atomic.h>
#define SDL_AtomicIncRef(a) SDL_AddAtomicInt(a, 1)
π DESCRIPTION π
Note: If you don't know what this macro is for, you shouldn't use it!
Like literally, bestie β if this isn't already your moment, do not force it. π This macro is for incrementing an atomic variable that's being used as a reference count, and it does that by expanding to SDL_AddAtomicInt(a, 1). Slay.
π MACRO PARAMETERS π
aβ a pointer to anSDL_AtomicIntto increment.
β RETURN VALUE β
Returns the previous value of the atomic variable. Not the new one, bestie β the previous one. π
π§ THREAD SAFETY π§
It is safe to call this macro from any thread. No cap. π
π AVAILABILITY π
This macro is available since SDL 3.2.0. Iconic behavior.
π¦ SEE ALSO π¦
Simple Directmedia Layer β’ SDL 3.4.18 β’ that's the footer, bestie, and this page ate. πβ¨π
π¦ 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