检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:朱剑辉 刘胜阳 郑渊[2] 洪小骏 苏思友 Zhu Jianhui;Liu Shengyang;Zheng Yuan;Hong Xiaojun;Su Siyou(Shanghai Aerospace Electronic Technology Institute,Shanghai 201108,China;Shanghai Academy of Spaceflight Technology)
机构地区:[1]上海航天电子技术研究所,上海201108 [2]上海航天技术研究院
出 处:《单片机与嵌入式系统应用》2023年第8期4-7,共4页Microcontrollers & Embedded Systems
摘 要:介绍了MCS-51单片机的内存分布、C51变量存储方式和函数参数传递方式,由此引发了对C51函数可重入性问题的思考和分析。与其他处理器C语言编译器不同的是,除了在函数体中显式访问全局资源会破坏函数的可重入性之外,C51函数参数传递和局部变量存储分配空间时,可能存在隐式的全局资源访问冲突,同样会导致函数不可重入。通过对各种情况下的全局资源访问冲突分析,提出了相应的解决方案以避免不可重入函数被多任务调用引起软件运行异常。In the paper,the memory distribution of MCS-51 microcontroller,the storage mode of C51 variable and the transfer mode of function parameter are introduced,which causes the thinking and analysis of the reentrant problem of C51 function.Unlike other processor C compilers,in addition to the fact that explicit access to global resources in the body of a function breaks function reentrant,C51 function parameter passing and local variable store allocation may also result in implicit global resource access conflicts that cause function non-reentrant.Based on the analysis of global resource access conflicts in various cases,the corresponding solutions are put forward to avoid software running exceptions caused by non-reentrant function being called by multi-task.
关 键 词:MCS-51 内存分布 变量存储 参数传递 访问冲突
分 类 号:TP31[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.62