When an atomic instruction executed by a computer processor locks a memory
location, the locking is performed before the processor has determined
whether the instruction is to be executed to completion or canceled. The
memory location is unlocked whether or not the instruction will be
canceled. Since the locking operation can occur before it is known whether
the instruction will be canceled, the reading of the memory location can
also occur early, before it is known whether the instruction will be
canceled.