2004-02-05 07:19 PM
2004-02-04 11:33 PM
Hello All,
Could anybody help me to resolve the re-entrant funcion issue in cosmic. I am using +modc memory model and I am putting @interrupt @stack before each interrupt handler but still the problem persists. I am getting error Reentrant function exists Many thanks in advance PraveenG2004-02-05 09:04 AM
To make a function reentrant all you have to do is use the @stack ,eg.
@stack void MyFunc(void) also make sure it is declared the same in the header file. Remember interrupt functions are always stack based by default in cosmic regardless of memory model used, so the @stack for an interrupt function is not necessary. By the sounds of your problem you are calling a normal function from within your interrupt routine, this function will need to be declared with the @stack option not the einterrupt. Regards sjo2004-02-05 07:19 PM