Module: xenomai-3
Branch: stable-3.0.x
Commit: f65293cf7c5cc5adae11fed6315623120f56a238
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f65293cf7c5cc5adae11fed6315623120f56a238

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Mar 18 18:20:50 2016 +0100

cobalt/thread: fix join request handling from non-Xenomai context

---

 kernel/cobalt/thread.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index a13ecaf..e16f7a3 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -1682,7 +1682,7 @@ int xnthread_join(struct xnthread *thread, bool 
uninterruptible)
        xnthread_set_state(thread, XNJOINED);
        tpid = xnthread_host_pid(thread);
        
-       if (!xnthread_test_state(curr, XNRELAX|XNROOT)) {
+       if (curr && !xnthread_test_state(curr, XNRELAX)) {
                xnlock_put_irqrestore(&nklock, s);
                xnthread_relax(0, 0);
                switched = 1;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to