All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH] fix regression around one-shot host tick
@ 2007-07-19  7:22 Jan Kiszka
  2007-07-19  9:05 ` Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2007-07-19  7:22 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

Philippe,

this bug was introduced with recent clock_event modifications:

--- ksrc/nucleus/timer.c	(Revision 2766)
+++ ksrc/nucleus/timer.c	(Arbeitskopie)
@@ -245,7 +245,7 @@ void xntimer_tick_aperiodic(void)
 			   translates into precious microsecs on low-end hw. */
 			__setbits(sched->status, XNHTICK);
 			if (!testbits(timer->status, XNTIMER_PERIODIC))
-				goto out;
+				continue;
 		}
 
 		do {
@@ -254,7 +254,6 @@ void xntimer_tick_aperiodic(void)
 		xntimer_enqueue_aperiodic(timer);
 	}
 
-out:
 	__clrbits(sched->status, XNINTCK);
 
 	xntimer_next_local_shot(sched);


It doesn't look like typo, so what was your original intention? The current code at least fails to handle outstanding timers that are enqueued right behind a one-shot host-tick timer.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

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

* Re: [Xenomai-core] [PATCH] fix regression around one-shot host tick
  2007-07-19  7:22 [Xenomai-core] [PATCH] fix regression around one-shot host tick Jan Kiszka
@ 2007-07-19  9:05 ` Philippe Gerum
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2007-07-19  9:05 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

On Thu, 2007-07-19 at 09:22 +0200, Jan Kiszka wrote:
> Philippe,
> 
> this bug was introduced with recent clock_event modifications:
> 
> --- ksrc/nucleus/timer.c	(Revision 2766)
> +++ ksrc/nucleus/timer.c	(Arbeitskopie)
> @@ -245,7 +245,7 @@ void xntimer_tick_aperiodic(void)
>  			   translates into precious microsecs on low-end hw. */
>  			__setbits(sched->status, XNHTICK);
>  			if (!testbits(timer->status, XNTIMER_PERIODIC))
> -				goto out;
> +				continue;
>  		}
>  
>  		do {
> @@ -254,7 +254,6 @@ void xntimer_tick_aperiodic(void)
>  		xntimer_enqueue_aperiodic(timer);
>  	}
>  
> -out:
>  	__clrbits(sched->status, XNINTCK);
>  
>  	xntimer_next_local_shot(sched);
> 
> 
> It doesn't look like typo, so what was your original intention?

The host timer is no more a purely periodic beast. Since it may be
aperiodic, we ought to get away from the interval update loop, otherwise
we'd remain stuck into it in the aperiodic case.

> The current code at least fails to handle outstanding timers that are enqueued right behind a one-shot host-tick timer.
> 

True, I've been slightly, mmm, radical here. Will merge.

> Jan
> 
-- 
Philippe.




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

end of thread, other threads:[~2007-07-19  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19  7:22 [Xenomai-core] [PATCH] fix regression around one-shot host tick Jan Kiszka
2007-07-19  9:05 ` Philippe Gerum

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.