How are interrupts handled when program execution is in critical region?
Below is the code of Sequencer function to register task.
void UTIL_SEQ_RegTask(UTIL_SEQ_bm_t TaskId_bm, uint32_t Flags, void (*Task)( void ))
{
UTIL_SEQ_ENTER_CRITICAL_SECTION();
TaskCb[SEQ_BitPosition(TaskId_bm)] = Task;
UTIL_SEQ_EXIT_CRITICAL_SECTION();
return;
}Here, when the program execution is in critical region, i.e. when line 5 is being executed, what will happen if any interrupt occurs? Since, in critical region, interrupts are disabled, if any interrupts occur, then will those interrupts will be serviced after exiting the critical region or those interrupts will be missed?
How do you guys handle this situation wherein you are in critical region and you get interrupt?
Regards,
noobmaster69