From: Jan Kiszka <jan.kiszka@domain.hid>
To: Martin Shepherd <mcs@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Selecting the appropriate RTDM _rt/_nrt ioctl at run-time.
Date: Thu, 07 May 2009 10:30:25 +0200 [thread overview]
Message-ID: <4A029C21.2010605@domain.hid> (raw)
In-Reply-To: <Pine.LNX.4.64.0905061412070.24701@domain.hid>
Martin Shepherd wrote:
> I'm in the process of writing an RTDM device driver. Some of the ioctl
> requests that it implements can only be executed from non-realtime
> context, due to the need for them to call Linux kernel functions,
> while other ioctl requests are context-agnostic, but are intended to
> be used from realtime context.
>
> At first glance the RTDM documentation appears to indicate that I
> should implement the ioctl requests that require non-realtime context
> in the ioctl_nrt() handler of the driver, and implement the remaining
> context-agnostic requests in both the ioctl_nrt() and ioctl_rt()
> handlers. However for this to work transparently, RTDM would have to
> know which request codes were implemented by ioctl_nrt() and which by
> ioctl_rt(), then automatically switch context, if needed, before
> calling them. I don't see anything implemented along these lines.
>
> In principle I could tell application writers that they have to
> explicitly switch to the secondary linux domain before calling
> rt_dev_ioctl() for a request that requires this. However I don't see
> any RTDM or Xenomai user-API call for switching contexts (other than
> xnshadown_relax(), which is marked as for internal use only). I
> imagine that one could do the equivalent by calling something like
> sleep(0) to force a switch to the Linux domain. But this seems like a
> kludge.
>
> Am I missing something obvious?
Maybe you want to study ksrc/drivers/serial16550A.c a bit. It comes with
some (IOCTL) use cases that should be similar to yours.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2009-05-07 8:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 23:12 [Xenomai-help] Selecting the appropriate RTDM _rt/_nrt ioctl at run-time Martin Shepherd
2009-05-07 8:14 ` Sebastian Smolorz
2009-05-07 8:30 ` Jan Kiszka [this message]
2009-05-07 23:23 ` Martin Shepherd
2009-05-07 23:36 ` Jan Kiszka
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=4A029C21.2010605@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=mcs@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.