Module: xenomai-3
Branch: wip/dovetail
Commit: 57fa6d9c669528adcbe21b7b8760b9c70e13cd5a
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=57fa6d9c669528adcbe21b7b8760b9c70e13cd5a

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 7983165..e5580b5 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -1678,7 +1678,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