Module: xenomai-head Branch: master Commit: 2e89711f81333c44bd61739dac68c7079aab883e URL: http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=2e89711f81333c44bd61739dac68c7079aab883e
Author: Philippe Gerum <r...@xenomai.org> Date: Thu Oct 27 16:16:20 2011 +0200 nucleus: propagate changes to user-visible thread state --- ksrc/nucleus/shadow.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c index 85960b8..6268e1a 100644 --- a/ksrc/nucleus/shadow.c +++ b/ksrc/nucleus/shadow.c @@ -2371,6 +2371,10 @@ static inline int do_hisyscall_event(unsigned event, unsigned domid, void *data) ret_handled: + /* Update the userland-visible state. */ + if (thread) + *thread->u_mode = thread->state; + trace_mark(xn_nucleus, syscall_histage_exit, "ret %ld", __xn_reg_rval(regs)); return RTHAL_EVENT_STOP; @@ -2398,7 +2402,7 @@ static inline int do_hisyscall_event(unsigned event, unsigned domid, void *data) * nucleus and a Xenomai replacement has been * substituted for it. */ - return RTHAL_EVENT_STOP; + goto ret_handled; /* * This syscall has not been substituted, let Linux handle @@ -2533,6 +2537,11 @@ static inline int do_losyscall_event(unsigned event, unsigned domid, void *data) xnshadow_relax(0, 0); ret_handled: + + /* Update the userland-visible state. */ + if (thread) + *thread->u_mode = thread->state; + trace_mark(xn_nucleus, syscall_lostage_exit, "ret %ld", __xn_reg_rval(regs)); return RTHAL_EVENT_STOP; _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git