All of lore.kernel.org
 help / color / mirror / Atom feed
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:27:22 +0200	[thread overview]
Message-ID: <1192714042.5884.20.camel@domain.hid> (raw)
In-Reply-To: <E5E9C6CC7DC8844A8DA7A9EFE7B5350E016387F8@domain.hid>

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.

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.




  parent reply	other threads:[~2007-10-18 13:27 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 [this message]
2007-10-18 13:43   ` Philippe Gerum
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=1192714042.5884.20.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.