首页 | 本学科首页   官方微博 | 高级检索  
     

嵌入式系统线程库同步机制的实现
作者单位:福州大学软件学院
摘    要:NPTL(本地POSIX线程库)具有较好的性能和稳定性,已成为Glibc的首选线程库。同步是为了达到多线程协同工作目的而设计的一种机制。线程库中同步函数的底层实现大多用汇编语言编写,因此,在将NPTL移植到不同嵌入式硬件平台时,必须重写相关代码。通过引入一个虚拟的锁设备,实现原子操作,进而实现同步函数,最小化硬件平台的相关性,方便地实现不同嵌入式平台上NPTL的同步机制。

关 键 词:线程  同步  原子操作

Implementation of Thread Library's Synchronization Mechanism in Embedded System
Authors:JIANG Lan-fan
Abstract:NPTL(Native Posix Thread Library) have better performance and stability, and have already become the preferred thread library of Glibc. Synchronization is a Mechanism designed to harmonize works between multithread. The bottom implementation of synchronization functions are mostly programmed with assembly language, therefore, related coeds should be rewritten when migrating NPTL to different hardware platforms. Atomic action can be implemented by introducing a virtual lock device, furthermore, synchronization functions can be accomplished. Relativity of hardware platform can be minimized in this way, therefore, NPTL's synchronization Mechanism can be expediently realized in different embedded platforms.
Keywords:thread  synchronization  atomic action
本文献已被 CNKI 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号