An operation that takes effect indivisibly relative to the specified competing accesses. An atomic increment protects the whole read-modify-write; separate atomic loads and stores do not make their combined sequence an atomic operation.
// Target: computer-science.bigb
An atomic operation that reads a shared object's value and changes it as one indivisible action. For an increment from , the two operations under mutual exclusion produce then in either software thread order. A test-and-set is another example. The operation's ordering guarantees for other data still depend on the memory model and its selected acquire-release synchronization semantics.
An atomic read-modify-write that replaces a location only if its current value matches an expected value. An update based on an old version can retry after a failed compare-and-swap instead of blindly overwriting a competing writer's change.
Articles by others on the same topic
There are currently no matching articles.