Securing interrupt-driven timers
In order to ensure that the read operation on an timer+interrupt-driven clock counter variable doesn't get messed up, instead of disabling ALL interrupts, I decided to simply shut off the timer, do the read, and then turn it back on. This should keep the clock counter variable safe while allowing other interrupts to jump in and do their thing during the clock read. Is this insane?
|