Module: xenomai-2.6 Branch: master Commit: 7250b742e5ccdbc7dad7a704b336c783f899a924 URL: http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=7250b742e5ccdbc7dad7a704b336c783f899a924
Author: Gilles Chanteperdrix <[email protected]> Date: Sat Jan 14 03:03:23 2012 +0100 nucleus: fix switchback with explicit migration sys_barrier is marked as lostage but do call xnshadow_harden explicitely. Such behaviour allows to escape XNOTHER shadows auto-switchback feature. The result is that newly created native skin XNOTHER threads start in primary mode. Avoid this by testing explicitely the current mode in do_losyscall_event in case switchback is wanted. --- ksrc/nucleus/shadow.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c index 1a16d79..835ac3a 100644 --- a/ksrc/nucleus/shadow.c +++ b/ksrc/nucleus/shadow.c @@ -2537,7 +2537,8 @@ int do_losyscall_event(unsigned event, rthal_pipeline_stage_t *stage, xnthread_get_rescnt(thread) == 0) sysflags |= __xn_exec_switchback; } - if (!sigs && (sysflags & __xn_exec_switchback) != 0 && switched) + if (!sigs && (sysflags & __xn_exec_switchback) != 0 + && (switched || xnpod_primary_p())) xnshadow_relax(0, 0); ret_handled: _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
