May 2020
Intermediate to advanced
524 pages
13h 35m
English
Critical sections (also known as critical regions) are regions of code that are surrounded by two macros where entry to these sections of code is controlled so that the code is entered by only one task at any time. A critical section is entered by calling taskENTER_CRITICAL() and exited by calling taskEXIT_CRITICAL(). These calls do not have any parameters and also do not return any values. Critical sections can also be implemented using mutexes and semaphores, but it is quicker to use the entry and exit macros described in this chapter. Interrupts are disabled inside the critical sections, either globally, or up to a specific priority level. A real-time multitasking FreeRTOS based project is given in this ...
Read now
Unlock full access