Critical Region

The critical region macros OS_ENTER_CRITICAL and OS_EXIT_CRITICAL allow access to shared memory and global flags without risk of interrupts. To meet real-time commitments, the OS must be within a critical region for the shortest possible time. Usually these macros are used internally by the OS, but even user may call these when needed. This method is recommended only if the critical section is small. It is NOT recommended that the user disable interrupts for long intervals of time, as this will affect the functioning of the RTOS scheduler. Also the user should NOT make kernel calls (i.e. calls to subroutines like create_task, Sleep etc.) from within critical sections.

Back to DocumentationIndex or Kernel Functions

There are no comments on this page.
Creative Commons License
Micro RTOS Documentation by Aliasgar Lokhandwala is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 3.0 License.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki