SDL Wiki

SDL_CompilerBarrier

Use this function to prevent the compiler from reordering reads and writes to globally visible variables across the call.

Syntax

void SDL_CompilerBarrier(void)

Remarks

This function only prevents the compiler from reordering reads and writes, it does not prevent the CPU from reordering reads and writes. However, all of the atomic operations that modify memory are full memory barriers.

This function is used in SDL_AtomicGet() and SDL_AtomicGetPtr().

SDL_AtomicGet
SDL_AtomicGetPtr

CategoryAPI, CategoryAtomic


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.