为了保证诸任务对临界critical资源l'eso~ 的互斥访问,VxWorks提供了任务同步机制。二进制信号量是VxWorks系统中实现任务同步的一种重要手段,它保证了任务在并发时结果的一致性。简要介绍二进制信号量,阐述用二进制信号量解决任务互斥和同步的方法,并给出二进制信号量应用在某数据采集系统中的程序框架。某数据采集系统中有
效地利用了VxWorks的信号量机制,实现了8个接收通道的数据采集、数据存储以及数据查询等任务对缓冲区的共享。
Task synchronizationforVxWorkstOacceSs criticall"l~ourc'emutuallyis applied.Binary so'aaphoreisanimportantmethodto realizing synchronization in VxWorks.The result consistent is improved when tasks are executed.The paper introduces binary—s~aaphore,
res~ ches the techniqu~ of solving mutexand synchronizatioa.and presents the program frame in X—data gathering system,which uses~mphoreto controlthedatagathering,stroing and queringtasks of 8一receiveing channels sharingthe buffer.
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !