All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] RTDM : invocation of _rt or _nrt
@ 2007-07-09  8:05 Perrine Martignoni
  2007-07-09  8:32 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: Perrine Martignoni @ 2007-07-09  8:05 UTC (permalink / raw)
  To: xenomai-help

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

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).

[-- Attachment #2: Type: text/html, Size: 395 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai-help] RTDM : invocation of _rt or _nrt
  2007-07-09  8:05 [Xenomai-help] RTDM : invocation of _rt or _nrt Perrine Martignoni
@ 2007-07-09  8:32 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2007-07-09  8:32 UTC (permalink / raw)
  To: Perrine Martignoni; +Cc: xenomai-help

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-09  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-09  8:05 [Xenomai-help] RTDM : invocation of _rt or _nrt Perrine Martignoni
2007-07-09  8:32 ` Jan Kiszka

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.