I have covered John's seminal work in uncovering problems with volatile in the past here and here. Volatiles Are Miscompiled, and What to Do about It by Eric Eide and John Regehr *must* be on your reading list if you are writing Embedded System code.
Bill Cox made a comment to my post that I completely agree with, and coding philosophy that I follow:
It requires a lot of discipline to minimize or eliminate global or non-static variables from your code, and it's worth it.
For an other tip related to 'volatile' take a read of Evaluating embedded code by Nigel Jones.
No comments:
Post a Comment