4 ms·
INC/DEC are internally decomposed into separate read-modify-write operations, but are still atomic with regards to interrupts; for multiprocessing you need the
by gpderetta 4y ago
INC/DEC are internally decomposed into separate read-modify-write operations, but are still atomic with regards to interrupts; for multiprocessing you need the LOCK prefix, which in the past brute-force locked the memory bus, but these days make sure that the operations are scheduled in such a way that the core is guaranteed not to lose ownership of the cacheline.