SDL_GetAtomicU32(3)

πŸ’– SDL_GetAtomicU32(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_GetAtomicU32 🫢


✨ NAME ✨

SDL_GetAtomicU32 β€” get the value of an atomic variable πŸ‘‘


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_atomic.h>

Uint32 SDL_GetAtomicU32(SDL_AtomicU32 *a);

like. that's it. that's the whole vibe. one function, one job πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Note: if you don't know what this function is for, you shouldn't use it! 😭

no fr fr, that's not me being shady, that's literally what the manpage says. if atomics aren't already your thing, this is your sign to back away slowly and go read about something else, bestie πŸ™ˆ


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • a β€” a pointer to an SDL_AtomicU32 variable. just hand it the address and it'll do its little thing ✨

πŸ’œ RETURN VALUE πŸ’œ

it returns the current value of an atomic variable. no cap, that's the whole return story 🌈


⭐ THREAD SAFETY ⭐

it is safe to call this function from any thread. any thread!! go wild, every thread is invited to the party πŸŽ‰πŸ§š


πŸ’… AVAILABILITY πŸ’…

this function is available since SDL 3.2.0. iconic behavior honestly πŸ‘‘


🌸 SEE ALSO 🌸


mwah πŸ’‹ that's the page!! brought to you by Simple Directmedia Layer, running SDL 3.4.18, and yes SDL_GetAtomicU32(3) really is the name up top and the name down here too. stay atomic, stay slay πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from