Module: xenomai-head Branch: master Commit: ffbc98cb5fe326ef6b09b32749571fcd1df3c908 URL: http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=ffbc98cb5fe326ef6b09b32749571fcd1df3c908
Author: Philippe Gerum <[email protected]> Date: Sun Oct 10 12:17:41 2010 +0200 nucleus: export all state bits to u_mode We will need to make more state bits visible from userland in the future additionally to XNRELAX, so export the entire thread status word through the u_mode window. This should help us not breaking the ABI each time we want to access additional thread state information from user-space. --- ksrc/nucleus/shadow.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c index 999cef3..586a08a 100644 --- a/ksrc/nucleus/shadow.c +++ b/ksrc/nucleus/shadow.c @@ -1019,7 +1019,7 @@ redo: return -ERESTARTSYS; if (thread->u_mode) - __xn_put_user(0, thread->u_mode); + __xn_put_user(thread->state & ~XNRELAX, thread->u_mode); preempt_disable(); @@ -1226,7 +1226,7 @@ void xnshadow_relax(int notify, int reason) root thread. */ if (thread->u_mode) - __xn_put_user(XNRELAX, thread->u_mode); + __xn_put_user(thread->state, thread->u_mode); trace_mark(xn_nucleus, shadow_relaxed, "thread %p thread_name %s comm %s", @@ -1401,7 +1401,7 @@ int xnshadow_map(xnthread_t *thread, xncompletion_t __user *u_completion, return ret; if (thread->u_mode) - __xn_put_user(XNRELAX, u_mode); + __xn_put_user(thread->state, u_mode); ret = xnshadow_harden(); _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
