Skip to contentSkip to conversation

task switching logging

Xenomai-help Johann Obermayr 2 participants 2 messages Mar 23, 2011 – Mar 25, 2011

lore
Share & tools
lore
#0 lore raw

Hello,

we use follow function to report task switching.

    rt_task_add_hook(T_HOOK_SWITCH, (void(*)(void*))taskSwitchXenomai);
    sched_info_install_switch_hook(taskSwitchLinux);

we does not get a hook callback for switch from gatekeeper to primary domain.

we have a shadow task running in primary. on some function it switch back to secondary. if we switch back the task with rt_task_set_mode(0,T_PRIMARY).
we only see the switching to gatekeeper and not the switch to primary ?

Any solution ?

Xenomai 2.5.6, linux kernel 2.6.32.15. gcc 4.3.3

Jimmy

#1 lore raw
Quoted 9 lines · Johann Obermayr

Hello,

we use follow function to report task switching.

     rt_task_add_hook(T_HOOK_SWITCH, (void(*)(void*))taskSwitchXenomai);
     sched_info_install_switch_hook(taskSwitchLinux);

we does not get a hook callback for switch from gatekeeper to primary domain.

Quoted 8 lines

we have a shadow task running in primary. on some function it switch back to secondary.
if we switch back the task with rt_task_set_mode(0,T_PRIMARY). we only see the switching to gatekeeper and not the switch to primary ?

Any solution ?

Xenomai 2.5.6, linux kernel 2.6.32.15. gcc 4.3.3

I am not sure I understand what you mean. Normally, with rt_task_hook, the hook is called for all switches between Xenomai scheduler tasks. So, when switching from secondary mode to primary mode, there should be only one hook call: for the switch from "root thread", that is Linux, to the real-time task itself. Are you sure this is not this call that you are seeing?

Signature · 1 line
					    Gilles.