An atomic operation is an operation in which the processor reads and writes memory during the same access to the bus, which prevents the simultaneous change of other processors or system devices. For instance. operation "test and installation", which can "read memory at location X", if it is set to 1, return an indicator indicating whether the value "without simultaneous access" has been set.
Wikipedia http://en.wikipedia.org/wiki/Linearizability .
, , . InterlockedTestExchange InterlockedIncrement, .
:
- :
while (test_and_set(&x) == 1) ;
, , x 1. x , , .