At 22:00 20-2-2009 +0100, you wrote: >i don't have a smart comment except: > >- on msp430 it's perfectly possible to read-modify-write to peripherals. > that's what the original 3.2.3 code was doing on all volatiles. Dmitry > >- except for the watchdog and flash controller... where the example they > are showing in the paper would never be used by a developer. > >- volatile access only disables caching, it doesn't protect against > incomplete data for larger data types. that is, if one function reads
>> http://preview.tinyurl.com/6pmr42 >> >> It would be interesting to hear the viewpoints on this of the compiler >> vendors who follow this group. I think the article makes pretty interesting reading material. Especially the following should't be broken: volatile int z; int i,c; for(i=0;i<10; i++) { c=z; } Just reading dummy bytes from some peripheral may seem stupid, but I'm quite sure I've used a similar construction several times. Nico Coesel
