Read-modify-write
From Wikipedia, the free encyclopedia
In computer science, read-modify-write is a class of atomic operations such as test-and-set, fetch-and-add, and compare-and-swap which both read a memory location and write a new value into it simultaneously, either with a completely new value or some function of the previous value.
These operations prevent race conditions in multi-threaded applications. Typically they are used to implement mutexs or semaphores.