Portability layer for atomic operations like compare-and-swap (CAS)
