All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: David Betz <david.betz@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Running more than one "skin" at the same time?
Date: Fri, 22 Sep 2006 20:33:30 +0200	[thread overview]
Message-ID: <1158950010.5175.103.camel@domain.hid> (raw)
In-Reply-To: <F75B1CC921BD8E43B7D0484C9AB4C490450F9F@SJEX2003CL1.gmi.domain>

On Fri, 2006-09-22 at 10:37 -0700, David Betz wrote: 
> Is it possible to run more than one skin on top of the nucleus at the
> same time? For instance, can I run the pSOS skin at the same time as
> the Xenomai Native API?

In short, not yet. There is a timing mode compatibility issue between
the native/POSIX skins and the pSOS module. This particular issue will
be fixed somewhere in the 2.3.x series. You might still mix both now
with a bit of hacking, but this would require that timeout values passed
to pSOS calls be rescaled as counts of nanoseconds instead of ticks,
which might not be an option for you.

> If so, would all of the calls from a single user mode process have to
> be to one of the skins or could calls be mixed? In other words, could
> a single thread in a user mode process at one point block on a pSOS
> semaphore and later block on a Native API semaphore? What are the
> rules for mixing and matching API calls?
> 

The rule of thumb is that blocking syscalls would require to be invoked
from threads created by the same skin, e.g. a pSOS sema4 would only
allow pSOS tasks to pend on it, but would allow any kind of task to post
it. The same goes for all calls that directly affect particular skin
properties (e.g. sending signals through ev_send() must target a pSOS
task). But for instance, a native task would be allowed to suspend or
resume a pSOS one, since the only thing that needs to be known at that
point is the target task identifier, and we basically don't care of the
caller's nature.

>  
> 
> The problem that I’m trying to solve is that I want to build my
> software on top of the Xenomai Native API but I may have a customer
> who wants to port their pSOS code onto the same platform. Is there a
> way to make that work? They will sometimes need to call functions in
> my firmware so will indirectly invoke Native API calls from their
> pSOS-based code.
> 
> 

A possible approach would be to make your native-based firmware appear
as a set of server task(s) to the pSOS side. Those native tasks would
have to wait for requests from the pSOS side sent using a native IPC
(that doesn't block the caller, e.g. rt_queue_send on the pSOS side,
rt_queue_receive on the native one, but NOT rt_task_send from the pSOS
side, which waits for a reply thus always blocks the caller).

>  
> 
> Thanks,
> 
> David Betz
> 
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
-- 
Philippe.




  reply	other threads:[~2006-09-22 18:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-22 17:37 [Xenomai-help] Running more than one "skin" at the same time? David Betz
2006-09-22 18:33 ` Philippe Gerum [this message]
2006-09-22 20:48   ` Gilles Chanteperdrix
2006-09-22 22:45     ` Philippe Gerum

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=1158950010.5175.103.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=david.betz@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.