Skip to contentSkip to conversation

root_thread_exit in pSOS skin

Xenomai-help d p 2 participants 4 messages Oct 3, 2006 – Oct 4, 2006

lore
Share & tools
lore

d p

author
#0 lore raw

I'm trying to use Xenomai over a Linux machine, in particular I'm trying to emulate a pSOS system by using the demo satch (executable satch_uvm). I see that root_thread_exit is never called.

How I have to do to get root_thread_exit called? I'd like to use this function to remove a pipe created in root_thread_init.

Regards

#1 lore raw
Quoted 6 lines · d p

I'm trying to use Xenomai over a Linux machine, in particular I'm trying to emulate a pSOS system by using the demo satch (executable satch_uvm). I see that root_thread_exit is never called.

How I have to do to get root_thread_exit called? I'd like to use this function to remove a pipe created in root_thread_init.

root_thread_exit maps to __xeno_user_exit [1], and that should get called by the UVM main function [2].

Jan

[1]http://www.rts.uni-hannover.de/xenomai/lxr/source/include/nucleus/types.h#L129 [2]http://www.rts.uni-hannover.de/xenomai/lxr/source/include/asm-uvm/system.h#L406

author
#2 lore raw
Quoted 3 lines · Jan Kiszka

root_thread_exit maps to __xeno_user_exit [1], and that should get called by the UVM main function [2].

OK, but I put a xnprintf in root_thread_exit and I never saw this print. I stop the emulation with CTRL+C.

Regards

#3 lore raw
Quoted 9 lines · d p
Quoted 3 lines · Jan Kiszka

root_thread_exit maps to __xeno_user_exit [1], and that should get called by the UVM main function [2].

OK, but I put a xnprintf in root_thread_exit and I never saw this print. I
stop the emulation with CTRL+C.

Yeah, that correlates very well with the endless loop a few line above in [2]...

In fact, I don't see how you should be able to install cleanup code this way under the UVM. Maybe replacing the for loop with something like this helps

while (uvm_thread_idle(&uvm_irqlock) >= 0)

	/* empty loop */;

but I'm leaving terra firma right now (never worked with the UVM).

Jan