My somewhat mechanistic (and somewhat manual) approach to this issue is that atomistic guarantees three things: reading and writing will not be broken by the context switch (so that you only see the values ββthat were actually stored in the variable); caches are cleared (therefore you do not see outdated values); and the compiler cannot move instructions as part of an atomic operation (so that operations that occur logically before atomic access actually occurs before that access). Please note that I tried to avoid any concept of "stream" here, although it is a bit more complicated.
If you are writing your own streaming engine, these properties are obviously important. They are orthogonal to the details of the slicing mechanism used.
For signal handlers, they give you a place to wait when you need to learn the values ββfrom the code executed in the signal handler, and when the signal handler needs to change the values ββthat the rest of the program cares about.
Iβm not sure if the ISR standard is formal (Iβm sure that this is not so), but from this mechanistic point of view, ISR is no different from a signal that does not come from a raise call. This is just an asynchronous function call, and it takes up the stack space that it receives from the thread that is interrupted. This is definitely not a stream; it is a parasite on an existing thread. Therefore, for ISR, I would go for a guarantee of signals, not a guarantee for flows.
source share