xenomai实时线程和非实时线程可以通过RTPIC 发送和接受数据,避免出现 switch to secondary mode.
·
不要在xenomai线程中调用影响实时性的API:
xenomai实时任务中不建议调用系统调用( sleep open close read write ioctl socket printf new malloc 等等),这些系统调用会让 xenomai switching to secondary mode (because of the plain linux syscalls) and then handeled by the linux scheduler(另外,系统调用会产生CPU软中断并陷入内核态,内核中可能会因等待外部设备响应或是DMA等操作破坏实时性). 如图所示:

其中实时和非实时采用RTIPC方式进行通信传递数据:

Refercence:
https://blog.csdn.net/GW569453350game/article/details/54580580
更多推荐
所有评论(0)