All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Killing Xenomai task on kernel shutdown
@ 2009-11-16 15:22 Steve Deiters
  2009-11-16 16:50 ` Gilles Chanteperdrix
  2009-11-16 17:11 ` Philippe Gerum
  0 siblings, 2 replies; 4+ messages in thread
From: Steve Deiters @ 2009-11-16 15:22 UTC (permalink / raw)
  To: xenomai

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

Are Xenomai tasks supposed to outlive the kernel?  I have a Xenomai task
that continues to run after the kernel is shut down.
 
I have a PowerPC board which has an external watchdog.  To keep this
happy I have a periodic Xenomai task that I create early in the kernel
startup with an initcall.  However, when the kernel shuts down I would
like to stop/delete the task so that the watchdog will restart the
processor.  Right now it seems that the task continues to run after
kernel shutdown.  If nothing else I can just manually stop it on
shutdown.
 
I'm not sure if there's a way to hook into the kernel shutdown.  I have
found the exitcall macros, but they seem to be only used for module
unloading and do not seem to be called on a regular shutdown.  The
initcall is in a board specific startup file.  If possible, I'd like to
keep the task deletion also in the same file.  I just do not know if
there is a hook available for this.
 
Thanks.

[-- Attachment #2: Type: text/html, Size: 1915 bytes --]

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

* Re: [Xenomai-help] Killing Xenomai task on kernel shutdown
  2009-11-16 15:22 [Xenomai-help] Killing Xenomai task on kernel shutdown Steve Deiters
@ 2009-11-16 16:50 ` Gilles Chanteperdrix
  2009-11-16 16:57   ` Steve Deiters
  2009-11-16 17:11 ` Philippe Gerum
  1 sibling, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2009-11-16 16:50 UTC (permalink / raw)
  To: Steve Deiters; +Cc: xenomai

Steve Deiters wrote:
> Are Xenomai tasks supposed to outlive the kernel?  I have a Xenomai task
> that continues to run after the kernel is shut down.
>  
> I have a PowerPC board which has an external watchdog.  To keep this
> happy I have a periodic Xenomai task that I create early in the kernel
> startup with an initcall.  However, when the kernel shuts down I would
> like to stop/delete the task so that the watchdog will restart the
> processor.  Right now it seems that the task continues to run after
> kernel shutdown.  If nothing else I can just manually stop it on shutdown.
>  
> I'm not sure if there's a way to hook into the kernel shutdown.  I have
> found the exitcall macros, but they seem to be only used for module
> unloading and do not seem to be called on a regular shutdown.  The
> initcall is in a board specific startup file.  If possible, I'd like to
> keep the task deletion also in the same file.  I just do not know if
> there is a hook available for this.

What version of xenomai are you running?

-- 
                                          Gilles



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

* Re: [Xenomai-help] Killing Xenomai task on kernel shutdown
  2009-11-16 16:50 ` Gilles Chanteperdrix
@ 2009-11-16 16:57   ` Steve Deiters
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Deiters @ 2009-11-16 16:57 UTC (permalink / raw)
  To: xenomai

Steve Deiters wrote:
> Are Xenomai tasks supposed to outlive the kernel?  I have a Xenomai 
> task that continues to run after the kernel is shut down.
>  
> I have a PowerPC board which has an external watchdog.  To keep this 
> happy I have a periodic Xenomai task that I create early in the kernel

> startup with an initcall.  However, when the kernel shuts down I would

> like to stop/delete the task so that the watchdog will restart the 
> processor.  Right now it seems that the task continues to run after 
> kernel shutdown.  If nothing else I can just manually stop it on
shutdown.
>  
> I'm not sure if there's a way to hook into the kernel shutdown.  I 
> have found the exitcall macros, but they seem to be only used for 
> module unloading and do not seem to be called on a regular shutdown.  
> The initcall is in a board specific startup file.  If possible, I'd 
> like to keep the task deletion also in the same file.  I just do not 
> know if there is a hook available for this.

What version of xenomai are you running?

-- 
                                          Gilles


It is kernel version 2.6.24.6 with Xenomai 2.4.10.


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

* Re: [Xenomai-help] Killing Xenomai task on kernel shutdown
  2009-11-16 15:22 [Xenomai-help] Killing Xenomai task on kernel shutdown Steve Deiters
  2009-11-16 16:50 ` Gilles Chanteperdrix
@ 2009-11-16 17:11 ` Philippe Gerum
  1 sibling, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2009-11-16 17:11 UTC (permalink / raw)
  To: Steve Deiters; +Cc: xenomai

On Mon, 2009-11-16 at 09:22 -0600, Steve Deiters wrote:
> Are Xenomai tasks supposed to outlive the kernel?  I have a Xenomai
> task that continues to run after the kernel is shut down.
>  

No provision is made to stop the real-time core upon shutdown, unless
the nucleus is compiled as a module and the Xenomai system gets
unloaded.

> I have a PowerPC board which has an external watchdog.  To keep this
> happy I have a periodic Xenomai task that I create early in the kernel
> startup with an initcall.  However, when the kernel shuts down I would
> like to stop/delete the task so that the watchdog will restart the
> processor.  Right now it seems that the task continues to run after
> kernel shutdown.  If nothing else I can just manually stop it on
> shutdown.
>  
> I'm not sure if there's a way to hook into the kernel shutdown.  I
> have found the exitcall macros, but they seem to be only used for
> module unloading and do not seem to be called on a regular shutdown.
> The initcall is in a board specific startup file.  If possible, I'd
> like to keep the task deletion also in the same file.  I just do not
> know if there is a hook available for this.

Linux provides one, see register_reboot_notifier().

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


-- 
Philippe.




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

end of thread, other threads:[~2009-11-16 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-16 15:22 [Xenomai-help] Killing Xenomai task on kernel shutdown Steve Deiters
2009-11-16 16:50 ` Gilles Chanteperdrix
2009-11-16 16:57   ` Steve Deiters
2009-11-16 17:11 ` 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.