3 ms·
relatively simple until you get into cache coherence (not an issue if you mark the memory as volatile)
by amelius 5y ago
relatively simple until you get into cache coherence (not an issue if you mark the memory as volatile)
- kadoban 5y agoMemory mapped IO is never cached as far as I know, so at least that's not a concern.
- AlotOfReading 5y agoYou'd still have to tell the compiler it's volatile if you were writing into the DMA buffer directly for some reason. GP just used the wrong words to say what they meant.
- avianes 5y agoThe volatile keyword in C has nothing to do with cache coherence and does not prevent cache coherence issues. It just forces the compiler to generate all memory accesses on this variable. And if this variable is in a cached memory region, then it opens the door to very usual cache coherency problems