From: Philippe Gerum <rpm@xenomai.org>
To: Thomas Necker <thomas.necker@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] xnpod_announce_tick when migrating from 2.3 to 2.4
Date: Thu, 18 Oct 2007 15:43:41 +0200 [thread overview]
Message-ID: <1192715021.5884.32.camel@domain.hid> (raw)
In-Reply-To: <1192714042.5884.20.camel@domain.hid>
On Thu, 2007-10-18 at 15:27 +0200, Philippe Gerum wrote:
> On Thu, 2007-10-18 at 14:11 +0200, Thomas Necker wrote:
> > Hello
> >
> > I'm trying to migrate our software from 2.3 to 2.4 and I'm struggling
> > with the new timebase concept.
> > Here is how it works in 2.3:
> > - I have a small kernel module that calls xnpod_stop_timer and then
> > xnpod_start_timer with a handling function of my own.
> > - This handling function does some housekeeping and then calls
> > xnpod_announce_tick to trigger the nucleus (and eventually the pSOS
> > skin).
> > This is basically what Philippe suggested about a year ago.
> > Now, all these functions are gone in 2.4, how's the best way to do
> > something similar now?
> > I couldn't figure out how the new timebase concept can be used for that.
> > Thanks in advance.
> >
>
> It's actually much simpler with 2.4. You may install a hook into the
> periodic tick handler by calling the following helper, somewhere in your
> module init code:
>
> xntbase_set_hook(psos_tbase, your_psos_hook);
>
> The only difference compared to your current approach is that Xenomai
> will have processed the incoming tick before calling your hook, so you
> don't need to forward the tick anymore. Sidenote: this only works with
> periodic timebases so far.
>
Actually, I now think we should rather implement to the traditional
"daisy-chain" pattern here, with the user-defined hook being called in
replacement of the genuine tick processing code, and the hook expected
to call into xntbase_tick() to signal the incoming tick when it sees
fit. This would allow the skin to implement time slowdowns etc.
Thomas, I'm going to send a patch asap to this end. Please rely on the
common behaviour (i.e. daisy-chain) you would expect from pSOS.
> You may want to have a look at the VxWorks skin (sysLib.c), which
> interposes on the global tick this way.
>
> > Regards,
> > Thomas
> >
> > _______________________________________________
> > Xenomai-help mailing list
> > Xenomai-help@domain.hid
> > https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
next prev parent reply other threads:[~2007-10-18 13:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-18 12:11 [Xenomai-help] xnpod_announce_tick when migrating from 2.3 to 2.4 Thomas Necker
2007-10-18 13:15 ` Jan Kiszka
2007-10-18 15:36 ` Thomas Necker
2007-10-18 15:45 ` Jan Kiszka
2007-10-18 13:27 ` Philippe Gerum
2007-10-18 13:43 ` Philippe Gerum [this message]
2007-10-18 14:10 ` Philippe Gerum
2007-10-18 15:58 ` [Xenomai-help] xnpod_announce_tick when migrating from 2.3 to2.4 Thomas Necker
2007-10-18 16:12 ` 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=1192715021.5884.32.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=thomas.necker@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.