Module: xenomai-forge
Branch: next
Commit: 1790b6a2dc39ce34f17e6191d199a5c940af271f
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=1790b6a2dc39ce34f17e6191d199a5c940af271f

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu May 22 11:38:01 2014 +0200

cobalt/synch: inline private and short code

---

 include/cobalt/kernel/synch.h |    2 --
 kernel/cobalt/synch.c         |   19 +++++++------------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/include/cobalt/kernel/synch.h b/include/cobalt/kernel/synch.h
index 8b9fd1c..60a2394 100644
--- a/include/cobalt/kernel/synch.h
+++ b/include/cobalt/kernel/synch.h
@@ -108,8 +108,6 @@ static inline struct xnthread *xnsynch_owner(struct xnsynch 
*synch)
        (((fastlock) & ~XNSYNCH_FLCLAIM) | ((enable) ? XNSYNCH_FLCLAIM : 0))
 #define xnsynch_fast_mask_claimed(fastlock) ((fastlock & ~XNSYNCH_FLCLAIM))
 
-void __xnsynch_fixup_rescnt(struct xnthread *thread);
-
 struct xnthread *__xnsynch_transfer_ownership(struct xnsynch *synch,
                                              struct xnthread *lastowner);
 #if XENO_DEBUG(SYNCH_RELAX)
diff --git a/kernel/cobalt/synch.c b/kernel/cobalt/synch.c
index e2a12dd..645df0e 100644
--- a/kernel/cobalt/synch.c
+++ b/kernel/cobalt/synch.c
@@ -519,8 +519,13 @@ struct xnthread *xnsynch_release(struct xnsynch *synch,
 
        trace_cobalt_synch_release(synch);
 
-       if (unlikely(xnthread_test_state(thread, XNWEAK)))
-               __xnsynch_fixup_rescnt(thread);
+       if (unlikely(xnthread_test_state(thread, XNWEAK))) {
+               if (xnthread_get_rescnt(thread) == 0)
+                       xnshadow_send_sig(thread, SIGDEBUG,
+                                         SIGDEBUG_RESCNT_IMBALANCE);
+               else
+                       xnthread_dec_rescnt(thread);
+       }
 
        lockp = xnsynch_fastlock(synch);
        threadh = xnthread_handle(thread);
@@ -639,16 +644,6 @@ void xnsynch_requeue_sleeper(struct xnthread *thread)
 }
 EXPORT_SYMBOL_GPL(xnsynch_requeue_sleeper);
 
-void __xnsynch_fixup_rescnt(struct xnthread *thread)
-{
-       if (xnthread_get_rescnt(thread) == 0)
-               xnshadow_send_sig(thread, SIGDEBUG,
-                                 SIGDEBUG_RESCNT_IMBALANCE);
-       else
-               xnthread_dec_rescnt(thread);
-}
-EXPORT_SYMBOL_GPL(__xnsynch_fixup_rescnt);
-
 struct xnthread *__xnsynch_transfer_ownership(struct xnsynch *synch,
                                              struct xnthread *lastowner)
 {


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

Reply via email to