Acquire-release synchronization 2026-10-14
A release on an atomic object can synchronize with an acquire that reads the released value, establishing happens-before for surrounding accesses. A test-and-set spinlock needs suitable acquisition and release semantics for its guarded data; relaxed flag operations alone do not supply that relationship. This is a separate question from the flag's indivisibility.[ref]
Working Draft, Standard for Programming Language C++ (N4861). pp. 1524–1525: relaxed ordering and release/acquire synchronization
Atomic read-modify-write 2026-10-14
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.
Spinlock 2026-10-14
A mechanism that waits for ownership by repeatedly trying while consuming CPU execution time. A spinlock built from test-and-set can enforce mutual exclusion without guaranteeing starvation freedom. Progress also requires the owner to run and release: if a waiting software thread monopolizes the only CPU while the owner is suspended, exclusive entry alone cannot help.[ref]