Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
chibios:articles:state_checker [2015/09/03 11:07]
giovanni
chibios:articles:state_checker [2015/09/03 11:12] (current)
giovanni
Line 10: Line 10:
 Not all RTOS functions can be called from any context, for example, it makes no sense to invoke from an ISR a function that puts to sleep the current task/​thread. Not all RTOS functions can be called from any context, for example, it makes no sense to invoke from an ISR a function that puts to sleep the current task/​thread.
  
-Usually RTOS functions include in the documentation the proper way and place to invoke them, the problem is that the thing is documented and not actually checked by the system. The State Checker ensures, at runtime, that all functionalities are used from an appropriate context.+Usually RTOS functions include in the documentation the proper way and place to invoke them, the problem is that the thing is documented and not actually checked by the system.
  
 The problem is exacerbated by the fact that this kind of errors often do not result in a clear malfunction but could cause rare and inexplicable crashes or malfunctions in the application. The problem is exacerbated by the fact that this kind of errors often do not result in a clear malfunction but could cause rare and inexplicable crashes or malfunctions in the application.
Line 16: Line 16:
 === State Checking === === State Checking ===
  
-When the State Checker is enabled the system state is checked each time an RTOS function is called, in case of violation the system is halted with an error code that can be retrieved using the debugger.+When the State Checker is enabled the system state is checked each time an RTOS function is called ​at runtime, in case of violation the system is halted with an error code that can be retrieved using the debugger.
  
 More details about ChibiOS debugging are available in the [[chibios:​articles:​debug_guide|Debugging Guide]]. More details about ChibiOS debugging are available in the [[chibios:​articles:​debug_guide|Debugging Guide]].
Line 22: Line 22:
 === Advantages === === Advantages ===
  
-The state Checker ensures that a whole class of **very common** errors related to RTOS use are found at development time. This greatly increases the odds that the final application code is as errors-free as possible.+The State Checker ensures that a whole class of **very common** errors related to RTOS use are found at development time. This greatly increases the odds that the final application code is as errors-free as possible
 + 
 +The point is to not let such errors go unnoticed, if the applications runs with State Checker enabled then there is a high level of confidence that the RTOS use is correct. Just a note, the other class of common errors are stack overflows, the system offers support also for detecting those at development time.
  
 </​WRAP>​ </​WRAP>​