Is it safe to share a volatile variable between the main program and an ISR in C?
<p>Is it safe to share an aligned integer variable, not bigger than the processor natural word, with volatile qualifier, between the main program and an ISR in C? Is it guaranteed that no torn reads or writes may happen?</p>