This patch enables ports of FreeRTOS to architectures which use/need more than
one stack.
To support the stack overflow checking functionality on such a port for the
additional stack(s), we need to have general (inline) functions where the stack
and such is not hard-coded.
Tested on a real hw with configCHECK_FOR_STACK_OVERFLOW == 2 and
portSTACK_GROWTH == -1.
I have not done more than glance at this one yet. I understand the desire to generalise the stack checking, but the patch is not there yet because it uses inline functions (remember FreeRTOS officially compiles with 18 different compilers so avoids using inline as different standards treat it differently ). Also, the checking has to be very fast, hence the macros that are expanded inline rather than function calls. I’m not sure (because I don’t use them often) if the compiler will always perform a direct substitution for an inline function without any parameter overhead. I suspect most compilers will as soon as you turn any kind of optimisation on.
I will look at what you are trying to achieve to see if there is an alternative that does not use the inlines.