Skip to contentSkip to conversation

Killing Xenomai task on kernel shutdown

Xenomai-help Steve Deiters 3 participants 4 messages Nov 16, 2009

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 10 lines · Steve Deiters

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.

Quoted 6 lines

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?

Signature · 1 line
                                          Gilles
#2 lore raw
Quoted 11 lines · Steve Deiters

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.

Quoted 7 lines

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?

Signature · 4 lines
                                          Gilles


It is kernel version 2.6.24.6 with Xenomai 2.4.10.
#3 lore raw
In reply to Steve Deiters
Quoted 3 lines · Steve Deiters

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.

Quoted 8 lines

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.

Quoted 6 lines

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().

Quoted 6 lines

Thanks.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Signature · 1 line
Philippe.