Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 685 Bytes

SDL_AtomicAdd.mediawiki

File metadata and controls

44 lines (27 loc) · 685 Bytes

Table of Contents

SDL_AtomicAdd

Add to an atomic variable.

Syntax

<syntaxhighlight lang="c"> int SDL_AtomicAdd(SDL_atomic_t *a, int v); </syntaxhighlight>

Function Parameters

a a pointer to an SDL_atomic_t variable to be modified
v the desired value to add

Return Value

Returns the previous value of the atomic variable.

Remarks

This function also acts as a full memory barrier.

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

Version

This function is available since SDL 2.0.2.

Related Functions

SDL_AtomicDecRef
SDL_AtomicIncRef

CategoryAPI, CategoryAtomic