Rule 2 and Nested Interrupts
If your system allows interrupt routines to nest, that is, it a higher-priority interrupt can interrupt a lower-priority interrupt routine, then another consideration comes into play. If the higher-priority interrupt routine makes any calls to RTOS functions, then the lower-priority interrupt routine must let the RTOS know when the lower-priority interrupt occurs. Otherwise, when the higher-priority interrupt routine ends, the RTOS scheduler may run some other task rather than let the lower-priority interrupt routine complete. Obviously, the RTOS scheduler should not run until all interrupt routines are complete.