Set proper atomic default depending on protocol used.
Make compare-and-swap atomic.