Is it safe to use extern data qualifier for a variable in an ISR?
+1
A:
Assuming C: yes, but you need to mark the variable wth keyword volatile to let the compiler know its value can change in more than one thread (the interrupt is basically a dofferent thread).
Mark E
2009-12-16 11:21:53
Keep in mind you might some kind of locking/atomic operations when accessing such a variable if it's on a multi processor machine, or the variable are accessed in multiple ISRs
nos
2009-12-16 12:58:17
@nos: Could you please elaborate your comment?
wrapperm
2009-12-18 07:32:17