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 ?
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 ?
Do you have an simple trivial exemple of rtdm driver with irq ?
Thank's
Patrick