This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

re-entrant code

what is a re-entrant code?
again what is re-entrant kernel?

thank you
ece tech

Parents
  • To make Per happy:
    This relates to the '51
    Since the OP started the thread with C51 I have changed MCU back to the C51 to stay with the OPs intent.

    I have never used reentrant code. Yes, I have had cases where it might have been desirable (e.g. a function shared by an ISR and main) but the potential debugging nightmare has kept me from using reentrant code.

    I think the OPs worry that he 'might' have reentranr code is greatly overblown. Just make sure that all functions called from ISRs (if you absolutely have to have them) have names that are e.g. ISR..... and no ISR.... function is called from main.

    Erik

    PS the one '51 case I can see for reentrant code would be to 'core use squeeze' a unit that was to be made in millions.

Reply
  • To make Per happy:
    This relates to the '51
    Since the OP started the thread with C51 I have changed MCU back to the C51 to stay with the OPs intent.

    I have never used reentrant code. Yes, I have had cases where it might have been desirable (e.g. a function shared by an ISR and main) but the potential debugging nightmare has kept me from using reentrant code.

    I think the OPs worry that he 'might' have reentranr code is greatly overblown. Just make sure that all functions called from ISRs (if you absolutely have to have them) have names that are e.g. ISR..... and no ISR.... function is called from main.

    Erik

    PS the one '51 case I can see for reentrant code would be to 'core use squeeze' a unit that was to be made in millions.

Children
No data