在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 1719|回复: 0

[讨论] 可表示硬件的函数或任务应该是可重入的还是不可重入的?

[复制链接]
发表于 2016-3-12 14:57:06 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

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的。


上述英文部分是否有误?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-1 00:56 , Processed in 0.022460 second(s), 9 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表