Complete the code to enter a critical section using FreeRTOS API.
taskENTER_CRITICAL();
// Critical code here
[1]();You must call taskEXIT_CRITICAL() with parentheses to exit the critical section properly.
Complete the code to disable interrupts in FreeRTOS.
[1]();
// Critical code here
portENABLE_INTERRUPTS();Use portDISABLE_INTERRUPTS() with parentheses to disable interrupts before critical code.
Fix the error in the code to properly exit a critical section.
taskENTER_CRITICAL();
// Critical code
[1];The function taskEXIT_CRITICAL() must be called with parentheses to properly exit the critical section.
Fill both blanks to create a critical section that disables interrupts and then enables them.
void critical_function() {
[1]();
// Critical code here
[2]();
}Use portDISABLE_INTERRUPTS() to disable interrupts and portENABLE_INTERRUPTS() to enable them after the critical code.
Fill all three blanks to create a dictionary comprehension that maps task names to their priority if priority is above 3.
task_priorities = { [1]: [2] for [1] in tasks if [2] > 3 }The comprehension iterates over task in tasks, maps task.name to task.priority, and filters where task.priority is greater than 3.