Add clobber flags directives to inline asm statements of atomic operations. Prevents compiler from moving flag modifying operations in between atomic and reading flags.
Issue might still exist in Windows where _Interlocked intrinsics are used.
Issue: #3352