LAORUAN
Newbie level 5
•If a task or function is to be re-entrant, it should be automatic.The variables also ought to be automatic, unless there is a specific reason for keeping the value from one call to the next. As a simple example, a variable that keeps a count of the number of times an automatic task or function is called would need to be static.
• If a task or function represents the behavior of a single piece of hardware, and therefore is not re-entrant, then it should be declared as static, and all variables within the task or function should be static.
The words above is copied from a book.
But, why should not a task or function representing the hardware be re-entrant?
In my opinion, a task or function representing the hardware can be instantiated for many times. So, it should be re-entrant.
• If a task or function represents the behavior of a single piece of hardware, and therefore is not re-entrant, then it should be declared as static, and all variables within the task or function should be static.
The words above is copied from a book.
But, why should not a task or function representing the hardware be re-entrant?
In my opinion, a task or function representing the hardware can be instantiated for many times. So, it should be re-entrant.