Module: xenomai-3
Branch: master
Commit: 3d9d71678207ac91f0f2da3c9875fedbb2df917e
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=3d9d71678207ac91f0f2da3c9875fedbb2df917e

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Jul 17 16:45:20 2015 +0200

cobalt/synch: do not serialize around nop code

---

 kernel/cobalt/synch.c  |    5 +++++
 kernel/cobalt/thread.c |    3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/cobalt/synch.c b/kernel/cobalt/synch.c
index ae4ceef..5b2d839 100644
--- a/kernel/cobalt/synch.c
+++ b/kernel/cobalt/synch.c
@@ -935,6 +935,9 @@ void xnsynch_detect_claimed_relax(struct xnthread *owner)
 {
        struct xnthread *sleeper;
        struct xnsynch *synch;
+       spl_t s;
+
+       xnlock_get_irqsave(&nklock, s);
 
        xnthread_for_each_claimed(synch, owner) {
                xnsynch_for_each_sleeper(sleeper, synch) {
@@ -945,6 +948,8 @@ void xnsynch_detect_claimed_relax(struct xnthread *owner)
                        }
                }
        }
+
+       xnlock_put_irqrestore(&nklock, s);
 }
 
 #endif /* XENO_DEBUG(MUTEX_RELAXED) */
diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index 7c8cb3a..4cec6e7 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -1989,7 +1989,6 @@ void xnthread_relax(int notify, int reason)
        struct task_struct *p = current;
        int cpu __maybe_unused;
        siginfo_t si;
-       spl_t s;
 
        primary_mode_only();
 
@@ -2046,9 +2045,7 @@ void xnthread_relax(int notify, int reason)
                        si.si_int = reason | sigdebug_marker;
                        send_sig_info(SIGDEBUG, &si, p);
                }
-               xnlock_get_irqsave(&nklock, s);
                xnsynch_detect_claimed_relax(thread);
-               xnlock_put_irqrestore(&nklock, s);
        }
 
        /*


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

Reply via email to