From: Jan Kiszka <jan.kiszka@domain.hid>
To: Patrick <kpa_info@domain.hid>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] RTDM
Date: Sat, 08 Sep 2007 10:35:10 +0200 [thread overview]
Message-ID: <46E25EBE.90700@domain.hid> (raw)
In-Reply-To: <46E15E3B.50706@domain.hid>
[-- 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 --]
next prev parent reply other threads:[~2007-09-08 8:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-09-14 8:09 Perrine Martignoni
2007-09-14 8:44 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46E25EBE.90700@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=kpa_info@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.