Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the
volatile
type qualifier to the global variables
representing external streams. As we expect these variables to be modifed concurrently or via interrupts, the volatile qualifier is appropriate, and prevents the compiler from performing code motion that might cause unexpected behavior. Ideally, these reads (which occur at the beginning of the step function) should also be protected by a critical section that masks interrupts or takes a mutex. Partially addresses #257
- Loading branch information