Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Requires use of special atomic processor instructions such as CAS (compare and swap) or , LL/SC (load linked/store conditional), or the C11 atomic_compare_exchange functions.

Applications:

  • Read-copy-update€ (RCU) in Linux 2.5 kernel
  • Lock-free programming on AMD multicore systems

The ABA problem occurs during synchronization, where a memory location is read twice and has the same value for both reads. However, another thread has modified the value, did other work, then modified the value back between the two reads, thereby fooling the first thread into thinking that nothing has the value never changed.

Noncompliant Code Example

...