Support compare and swap