From: Jan Kiszka <jan.kiszka@domain.hid>
To: Perrine Martignoni <perrmart@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] RTDM : invocation of _rt or _nrt
Date: Mon, 09 Jul 2007 10:32:34 +0200 [thread overview]
Message-ID: <4691F2A2.9090605@domain.hid> (raw)
In-Reply-To: <7289437c0707090105m2ee4cc2fvbf70b60a71cb4d88@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]
Perrine Martignoni wrote:
> Hello,
>
> Currently, I'm writing some drivers with RTDM and I ask me a few questions.
> If I have two different functions associated to open_rt and open_nrt for
> instance, how can I call one or the other ?
> I tried and when I call rt_dev_open, it takes the open_nrt by default (it
> seems).
The _rt-variants of RTDM handlers are taken if the caller runs in
primary mode, i.e. over a Xenomai thread and without previously
switching to Linux for some syscall.
Generally, you don't need to worry about _rt handlers for
open/socket/close. Most initialisation and cleanup work requires Linux
context anyway. Thus, providing only a _nrt handler is the right thing
to do. Moreover, I'm considering to remove open_rt/socket_rt/close_rt
for one of the next RTDM revisions to simplify things and to avoid
confusion like this. So if you see a real need for device
opening/closing in hard RT context, speak up loudly soon. :)
Things are different, e.g., when looking at ioctl_rt/nrt. There is a
fair amount of reasonable use cases where you need handlers for both
context to address different caller contexts with different code (e.g.
to fail via -ENOSYS if the other context is required and let Xenomai
then switch the caller over to the right context automatically).
Hope that clarified things. If not, don't hesitate to ask again.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
prev parent reply other threads:[~2007-07-09 8:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-09 8:05 [Xenomai-help] RTDM : invocation of _rt or _nrt Perrine Martignoni
2007-07-09 8:32 ` Jan Kiszka [this message]
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=4691F2A2.9090605@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=perrmart@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.