Question

I'm compiling for a basic microcontroller in C that has just one interrupt priority level; there is just one ISR. I would like to be warned of thread safety issues, between the ISR and the main() thread.

Is this something static analysers can do? What sort of thread safety issues can/can't they catch? Is it something Splint could do?

Example 1: could it detect if a variable should be given the volatile keyword if it is used in both the ISR and main thread?

Example 2: Where the main thread has multiple operations that are required in their combination to be atomic, (perhaps indicated in source by annotations), could static analysers indicate if they could be interrupted by the ISR and be corrupted?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top