Am I in task or ISR ?

Hi Can you please tell me how can I know if I am in task or ISR ? Is there an freeRTOS API for this issue ? Thank You Michael

Am I in task or ISR ?

You can always query the hardware itself, other than that it depends which port you are using. If you are using Cortex-M then you can call xPortIsInsideInterrupt().

Am I in task or ISR ?

I’m using MIPS. Is the function port_IsInISR() is good for that purpose ? Thanks

Am I in task or ISR ?

The PIC32 MIPS port? If so you can just check the uxInterruptNesting variable, which is declared in the port.c file for that port. If its not zero then you are in an ISR.

Am I in task or ISR ?

Thank you very much Richard