Atomics and Fences
Read-modify-write instructions and ordering instructions: how C11 memory orders map onto lock prefixes, LDAXR/STLXR, LR/SC and the fences each ISA requires.
Read-modify-write instructions and ordering instructions: how C11 memory orders map onto lock prefixes, LDAXR/STLXR, LR/SC and the fences each ISA requires.
How a read-modify-write grabs a cache line exclusively, why LL/SC fails spuriously, and when a queue lock or futex beats a spinning test-and-set.