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

reentrant function

what is reentrant function?

Parents Reply Children
  • You list requirements of a reentrant function, not a definition. A reentrant function must be able to be re-entered at any time while executing. Thus it may not use static data. You either pass in the context upon which to operate or use stack based variables. The use of stack based variables causes some performance issues with C on the 8051 since a reentrant stack must be created and used.

    - Mark

  • Nice definition. I'll add one more thing.

    Reentrant functions are not necessarily recursive. A recursive function is one that calls itself (directly or indirectly).

    Jon