All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai-help] Problems with rt_task_wait_period
@ 2006-08-07 14:42 Steve Kreyer
  2006-08-07 15:27 ` Jan Kiszka
  2006-08-07 15:32 ` Philippe Gerum
  0 siblings, 2 replies; 26+ messages in thread
From: Steve Kreyer @ 2006-08-07 14:42 UTC (permalink / raw)
  To: rpm; +Cc: xenomai, jan.kiszka

Ok problem fixed,

the last email was a typo by me :)
If I increase the period to 1000 ns I get a system crash, when its 1us the task work like expected.
But what does explain the System crash if the period is around 1000 ns?

Thanks 

Steve
-----Ursprüngliche Nachricht-----
Von: rpm@xenomai.org
Gesendet: 07.08.06 16:32:17
An: Jan Kiszka <jan.kiszka@domain.hid>
CC: xenomai@xenomai.org
Betreff: Re: [Xenomai-help] Problems with rt_task_wait_period


On Mon, 2006-08-07 at 16:17 +0200, Jan Kiszka wrote:
> Philippe Gerum wrote:
> > On Mon, 2006-08-07 at 15:45 +0200, Jan Kiszka wrote:
> >> Steve Kreyer wrote:
> >>> Hi,
> >>>
> >>> Iam new to xenomai. 
> >>> For warming up I try to run this little test program:
> >>>
> >>> -----------------------------------------------------------------------
> >>> #include <native/task.h>
> >>> #include <stdio.h>
> >>> #include <sys/mman.h>
> >>>
> >>> RT_TASK task1;
> >>>
> >>> void rt_task1(void* user_data){
> >>>     int err = 0;
> >>>     printf("%d\n", rt_task_set_periodic(NULL, TM_NOW, 100));
> >> You are running in one-shot mode, thus all time units are in
> >> *nanoseconds*. 100 ns cycles tend to pass quite quickly, thus the setup
> >> actually fails (but it doesn't report this - a corner case for
> >> considering this a bug).
> > 
> > The setup does not really fail, but the period is so short that the tick
> > occurs before the task has a chance to wait for the first release point
> > in the timeline, so rt_task_wait_period() notices that no timer is
> > outstanding, but incorrectly concludes that no timer was ever armed.
> 
> Mmh, wouldn't the box simply lock up if the setup succeeded? It's a
> periodic timer... :->

No it would not, because of the first test in xnpod_wait_thread_period()
that checks if the timer is still enqueued, and because the application
properly tests the return value. Actually, using an additional flag to
state that a timer has indeed been started would be better than
recycling the enqueuing bit for the purpose of testing the timer
validity. An elapsed timer is still a valid one.

> 
> Jan
> 
-- 
Philippe.




__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!		
Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2006-08-28 14:46 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-07 14:42 [Xenomai-help] Problems with rt_task_wait_period Steve Kreyer
2006-08-07 15:27 ` Jan Kiszka
2006-08-07 15:32 ` Philippe Gerum
2006-08-25 15:31   ` [Xenomai-help] Timer problems? Steve Kreyer
2006-08-25 17:47     ` Jan Kiszka
2006-08-26 20:34       ` Steve Kreyer
2006-08-27 10:38         ` Jan Kiszka
2006-08-27 12:08           ` Philippe Gerum
2006-08-27 12:24             ` Bernhard Walle
2006-08-28 14:46               ` Philippe Gerum
2006-08-27 12:34             ` Gilles Chanteperdrix
2006-08-27 13:02               ` Philippe Gerum
2006-08-27 13:56                 ` Jan Kiszka
2006-08-27 13:47             ` Steve Kreyer
2006-08-27 14:22               ` Philippe Gerum
2006-08-27 14:25                 ` Philippe Gerum
2006-08-27 14:45                   ` Steve Kreyer
     [not found]           ` <44F196A0.2030006@domain.hid>
2006-08-27 13:00             ` Steve Kreyer
2006-08-25 17:57     ` [Xenomai-help] " Bernhard Walle
2006-08-26 21:23       ` Steve Kreyer
2006-08-26 21:38         ` Bernhard Walle
2006-08-26 22:12         ` Philippe Gerum
2006-08-27  9:21           ` Steve Kreyer
2006-08-27  9:34             ` Philippe Gerum
2006-08-27 10:31             ` Gilles Chanteperdrix
2006-08-27  9:27           ` Steve Kreyer

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.