P99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Atomic operations on i386 and x86_64

This implementation uses the xchgl instruction that has been implemented since the early days of i386.

This instruction has an implicit lock prefix and no further OS support is needed to make it lock-free.

Remarks
This is only used if the gcc extensions for atomic lock free operations is not implemented directly by the compiler.
Uses the asm extension of gcc for inline assembler.