What kind of code can be called “re-entrant”?

前端 未结 9 1296
时光说笑
时光说笑 2020-12-24 02:34

Could someone tell me what code can be called \"re-entrant\" code?

I came across this word when reading some real time operating system. What disciplines must be st

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-24 02:44

    Simply saying, a re-entrant code is a code which can be shared among multiple process.

    This is possible when the following conditions are satisfied:

    1. It should not have global and static data.
    2. It should not modify it's own code.
    3. It should not call another re-entrant function or code segment.

    So, a code following these conditions can be called re-entrant code.

提交回复
热议问题