不要在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等操作破坏实时性). 如图所示:

xenomai实时线程和非实时线程可以通过RTPIC 发送和接受数据,避免出现 switch to secondary mode.

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

xenomai实时线程和非实时线程可以通过RTPIC 发送和接受数据,避免出现 switch to secondary mode.

 

Refercence:

https://moodle-arquivo.ciencias.ulisboa.pt/1415/pluginfile.php/105637/mod_resource/content/2/SETR_xenomai.pdf

https://blog.csdn.net/GW569453350game/article/details/54580580

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2021-12-28
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
猜你喜欢
  • 2021-08-17
  • 2022-12-23
  • 2021-05-07
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案