logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_AddAtomicInt - Add to an atomic variable.

Availability

       This function is available since SDL 3.2.0.

Description

       This function also acts as a full memory barrier.

       Note:Ifyoudon'tknowwhatthisfunctionisfor,youshouldn'tuseit!

Function Parameters

a      a pointer to an SDL_AtomicInt variable to be modified.

       v      the desired value to add.

Name

       SDL_AddAtomicInt - Add to an atomic variable.

Return Value

       Returns the previous value of the atomic variable.

See Also

SDL_AtomicDecRef(3), SDL_AtomicIncRef(3)

Simple Directmedia Layer                           SDL 3.2.20                                SDL_AddAtomicInt(3)

Synopsis

#include<SDL3/SDL_atomic.h>intSDL_AddAtomicInt(SDL_AtomicInt*a,intv);

Thread Safety

       It is safe to call this function from any thread.

See Also