---
name: "SDL_SetAtomicPointer"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_SetAtomicPointer"
---

# SDL\_SetAtomicPointer(3)

Set a pointer to a value atomically.

## NAME

SDL\_SetAtomicPointer - Set a pointer to a value atomically.

## HEADER FILE

Defined in SDL3/SDL\_atomic.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**void \* SDL\_SetAtomicPointer(void \*\*a, void \*v);**

## DESCRIPTION

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

## FUNCTION PARAMETERS

- *a*

  a pointer to a pointer.

- *v*

  the desired pointer value.

## RETURN VALUE

Returns the previous value of the pointer.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CompareAndSwapAtomicPointer**(3)](/SDL_CompareAndSwapAtomicPointer/3.md), **•**(3), [**SDL\_GetAtomicPointer**(3)](/SDL_GetAtomicPointer/3.md)
