Wiki Page Content

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)

Code Examples

You can add your code example here

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().


CategoryAPI, CategoryAtomic

None: SDL_CompilerBarrier (last edited 2011-02-02 18:32:36 by SheenaSmith)

Feedback
Please include your contact information if you'd like to receive a reply.
Submit