Le lundi 04 janvier 2021 à 19:58 +0800, 孙世龙 sunshilong via Xenomai a écrit : > Is it possible to implement a real-time API to read the files on the disk? > > As far as I know, there is no such an interface now, but is it > possible to achieve this goal?
I doubt it could be. It depends on what you mean by "real-time", but disks (hard-disks and ssds as well) typically have non-deterministic response times, which breaks any real-time promise. There may be a way to define an api using only asynchronous operations. I don't know enough of the low-level stuff involved in sata to have a strong opinion on this. It's possible with some flash devices and microcontrollers. The other way is: do your i/o in a linux thread, communicating asynchronously with your rt threads. Regards, Julien