All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] migration scenario to xenomai
Date: Sat, 07 Aug 2010 13:36:36 +0200	[thread overview]
Message-ID: <1281180996.1706.118.camel@domain.hid> (raw)
In-Reply-To: <4C5D3D59.3050208@domain.hid>

On Sat, 2010-08-07 at 13:02 +0200, Gilles Chanteperdrix wrote:
> Guenter Ebermann wrote:
> > Hi Gilles,
> > 
> > Gilles Chanteperdrix wrote:
> >> Guenter Ebermann wrote:
> >>> Yeah, I understand your point with generic interface and device driver
> >>> separation. And I really like the way this happens under linux/xenomai. I am
> >>> also willing to write new drivers which are usable by a broader public using
> >>> these design principles. But the communication stack I am gona use (AUTOSAR
> >>> FlexRay stack) does not follow them. AUTOSAR (www.autosar.org) specs defines
> >>> the Interfaces and layers of the whole communcation system for cars. It does
> >>> not involve kernel/userspace separation, but it also does not mix the low-level
> >>> code with application code. Low level code is only implemented in the device
> >>> drivers (CAN, LIN, FlexRay), but the interface to the upper level stack is not
> >>> generic (as in linux with device drivers) - it is different for each kind of
> >>> lower layer device (CAN, LIN, FlexRay) to gain the best performance from each
> >>> of them.
> >> Well, it looks to me like you can implement the interface between driver
> >> and user-space with standard posix interface (especially ioctl), and
> >> then implement the AUTOSAR interfaces as a user-space library relying on
> >> this posix interface.
> > 
> > Yes, this will work for the send direction for LIN and CAN very fine. But
> > receive operation happens via function calls (RxIndications) from driver to
> > upper layer. Also send direction of FLEXRAY is a call from driver to upper
> > layer with a request to fill the buffers.
> > 
> > Can I make callbacks from xenomai rtdm into a xenomai app in user space?
> > Or can I register C-callbacks with ioctrl at driver?
> 
> The support to have this is almost in place, we call it user-space
> signals, because this is essentially the way posix signals are
> implemented, but it applies to any type of user-space callback triggered
> by a kernel-space action.
> 
> With the current method, the callback would be called only when
> returning from a system call, but with the "mayday" support, implemented
> in Xenomai 2.5.4, we have a way to have the callbacks being able to
> interrupt any piece of code. The support we have currently is only the
> core support, we need some window-dressing for the RTDM skin, though.
> 
> But all this can be sorted out pretty quickly if need be.

Until this is available, a straightforward approach would be to create
some server thread of high priority in the receiving application,
waiting for indications on a blocking ioctl() call dequeuing them from
kernel space, then running the userland callback as required.

-- 
Philippe.




      reply	other threads:[~2010-08-07 11:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06 21:42 [Xenomai-help] migration scenario to xenomai Guenter Ebermann
2010-08-06 21:51 ` Thomas Lockhart
2010-08-07  9:28   ` Guenter Ebermann
2010-08-07 23:17     ` Wolfgang Denk
2010-08-07  7:46 ` Gilles Chanteperdrix
2010-08-07 10:13   ` Guenter Ebermann
2010-08-07 10:36     ` Gilles Chanteperdrix
     [not found]       ` <B6A5952D-4182-4D39-B28E-0D9BAE2872C4@domain.hid>
2010-08-07 11:02         ` Gilles Chanteperdrix
2010-08-07 11:36           ` Philippe Gerum [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=1281180996.1706.118.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=gilles.chanteperdrix@xenomai.org \
    --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.