* [Xenomai-help] RTDM
@ 2007-09-06 10:14 Patrick
2007-09-06 21:42 ` Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Patrick @ 2007-09-06 10:14 UTC (permalink / raw)
To: Xenomai
[-- Attachment #1: Type: text/html, Size: 527 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] RTDM
2007-09-06 10:14 [Xenomai-help] RTDM Patrick
@ 2007-09-06 21:42 ` Jan Kiszka
2007-09-07 14:20 ` Patrick
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2007-09-06 21:42 UTC (permalink / raw)
To: Patrick; +Cc: Xenomai
[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]
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.
>
> 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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] RTDM
2007-09-06 21:42 ` Jan Kiszka
@ 2007-09-07 14:20 ` Patrick
2007-09-08 8:35 ` Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Patrick @ 2007-09-07 14:20 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai
[-- Attachment #1: Type: text/html, Size: 2274 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] RTDM
2007-09-07 14:20 ` Patrick
@ 2007-09-08 8:35 ` Jan Kiszka
0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2007-09-08 8:35 UTC (permalink / raw)
To: Patrick; +Cc: Xenomai
[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Xenomai-help] RTDM
@ 2007-09-14 8:09 Perrine Martignoni
2007-09-14 8:44 ` Gilles Chanteperdrix
0 siblings, 1 reply; 6+ messages in thread
From: Perrine Martignoni @ 2007-09-14 8:09 UTC (permalink / raw)
To: xenomai-help
[-- Attachment #1: Type: text/plain, Size: 277 bytes --]
Hello,
I have to write some drivers in an environment Linux+Xenomai on a
PowerQuickIIPro board. And I want to know what are the advantages to do the
drvivers with RTDM.
Are system calls faster in the Xenomai context?
Have you some tests who show the difference?
Best Regards
[-- Attachment #2: Type: text/html, Size: 374 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] RTDM
2007-09-14 8:09 Perrine Martignoni
@ 2007-09-14 8:44 ` Gilles Chanteperdrix
0 siblings, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2007-09-14 8:44 UTC (permalink / raw)
To: Perrine Martignoni; +Cc: xenomai-help
On 9/14/07, Perrine Martignoni <perrmart@domain.hid> wrote:
> Hello,
>
> I have to write some drivers in an environment Linux+Xenomai on a
> PowerQuickIIPro board. And I want to know what are the advantages to do the
> drvivers with RTDM.
> Are system calls faster in the Xenomai context?
> Have you some tests who show the difference?
The difference is a difference of design. When using RTDM, driver code
is cleanly separated from application code. This leads to an easier
maintenance, because it allows the two codes to evolve independently.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-09-14 8:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-06 10:14 [Xenomai-help] RTDM Patrick
2007-09-06 21:42 ` Jan Kiszka
2007-09-07 14:20 ` Patrick
2007-09-08 8:35 ` Jan Kiszka
-- strict thread matches above, loose matches on Subject: below --
2007-09-14 8:09 Perrine Martignoni
2007-09-14 8:44 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.