Back in the good old days of 68k, both pre/post pointer increments/decrements were more or less guaranteed to be atomic, due to the relatively general relationship between the stack pointer and other more generic address registers. As this behaviour is clearly a 68k artefact which may not procure the most efficient implementation on an alternate platform, would I be correct in assuming that the C specification makes no claims as to the “atomicity” of these operations.
Back in the good old days of 68k, both pre/post pointer increments/decrements were more
Share
Yes. The current standard (both C99 and C89, IIRC) makes no claims about atomicity. That is definitely platform-specific, and probably depends on the compiler as well.
Why is it necessary for these operations to be atomic, if I may ask?