“That being said, I am wondering how does the mechanism to inform the kernel that an interrupt has arrived works in FreeRTOS? ”
The kernel does not effect how interrupts are processed in the RX port. The MCU just accepts the interrupt as per normal, processes it (maybe nests with other interrupts), then returns to the task level when all interrupt processing is complete.
If no yield is required in the interrupt then the interrupt will return to whichever task was running prior to the interrupt being entered.
If a yield is required in the interrupt then portYIELD_FROM_ISR() just sets a software interrupt into the pending state, then when the interrupt completes the software interrupt will execute. The software interrupt may change the task that is in the Running state, and therefore return to a task that is not the same as the task that was originally interrupted - therefore a context switch has been performed.
The software interrupt is the lowest priority interrupt, so will never mask other interrupts, as is guaranteed to complete last if it gets interrupted by any higher priority interrupts.
Ah ... I see, that makes it so much clearer now. Thanks loads :)
Big fan of your work! Cheers!