|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
•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.
重点请看加粗部分,请问如何理解表示硬件的函数或任务是不可重入的?
我的理解是,如果调用多次函数来生成多个相同的硬件,那里面的变量应该是automatic的,所以应该是可重入的才对?
而且在阅读本书的时候,后文中也说明了函数和任务如果要是可综合的,必须是automatic的。
上述英文部分是否有误? |
|