Patrick wrote: > > Jan Kiszka a écrit : >> Patrick wrote: >> >>> Hy, >>> >>> I don't understand the difference between rtdm function and standard >>> function. >>> For exemple what is the diffrence between rtdm_printk and printk >>> >> >> Technically? None these days (printk is provided RT-safe by >> Adeos/I-pipe), but it documents that the message may be printed from RT >> context. And who know if some future RTDM implementation may not have to >> differentiate internally again... >> >> >>> or rtdm_malloc >>> and malloc ? >>> >> >> You mean kmalloc (malloc is user space only)? rtdm_malloc provides >> memory from a dedicated pool (dedicated to Xenomai, excluding Linux) and >> uses a predictable allocator (as long as the memory usage pattern is >> predictable). kmalloc is non-deterministic, and is shared with the whole >> Linux kernel. >> > Yes I use kmalloc... sorry > So kmalloc and rtdm_kmalloc is exactly the same ?
They share the same purpose, but details differ, just look at the function arguments... > >> >>> I am developping an RT driver so I must simply used only functions rtdm ? >>> >> >> Regarding the two services above: Depends on the context. If they run in >> non-RT driver cleanup or device instantiation context, you should >> continue to use standard Linux services. Just for usage from RT contexts >> (tasks, IRQ handlers (please don't allocate memory in the latter >> context, though...)) switch to those RTDM variants. >> >> Jan >> >> > For IRQ handlers I use the rt_intr_ functions it's not right ? what is the > difference between this functions and th rtdm_irq ? Besides details, the main point is that you shall not mix APIs in your driver if you want to keep it portable to future RTDM environment. > > Do you have an simple trivial exemple of rtdm driver with irq ? We still need to add such a tutorial to the RTDM series. In the meantime, you could have a look at irqbench from the testsuite for a more simple scenario. But, of course, you can also dig inside the other RTDM drivers in-tree or beyond, they are just not that simple. Jan
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
