Different flavor's of functions

Some ports provide xPortIsInsideInterrupt() and I’ve seen code using it to distinguish the execution context resp. using the appropriate FreeRTOS/FromISR API (including the trailing portYIELD_FROM_ISR() used by some ports).
Such an abstraction won’t work in any case especially you can’t use blocking API calls the same way as in tasks because ISRs can’t and shouldn’t block or wait.
This topic has been discussed in the forum a number of times. See e.g. this post for some further details.