3 ms·
> it's a sequence of instructions that either runs to completion atomically or doesn't The way I read it, it either runs to completion in one go, or gets resta
by crote 5mo ago
> it's a sequence of instructions that either runs to completion atomically or doesn't
The way I read it, it either runs to completion in one go, or gets restarted from the beginning. This means the sequence as a whole isn't executed atomically, as the already-executed instructions during an interrupt aren't rolled back.
It can be used to build atomic actions, but it is up to the developer to create a sequence of instructions where the very last instruction "commits" the entire operation, with the side-effects of partial execution being harmless.
- bryanlarsen 5mo agoYes, it's either atomic or the last instruction is guaranteed not to have run. I made this a little harder to read by inserting another clause in the sentence.
- zestyping 5mo ago[dead]