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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Feb 25 16:53:43 2014 +0100

vxworks: fix interrupt state corruption in auto-cleanup

---

 include/vxworks/ppd.h |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/include/vxworks/ppd.h b/include/vxworks/ppd.h
index 70a3416..edacd2e 100644
--- a/include/vxworks/ppd.h
+++ b/include/vxworks/ppd.h
@@ -94,15 +94,13 @@ static inline wind_rholder_t *wind_get_rholder(void)
                        obj = rlink2##__name(holder);                   \
                        err = __name##Delete((__natural_word_type)obj); \
                        __wind_trace_release(#__name, obj, err);        \
-                       if (unlikely(err)) {                            \
-                               if ((__rq) != &__wind_global_rholder.__name##q) 
{ \
-                                       xnlock_get_irqsave(&nklock, s); \
-                                       nholder = popq((rq), holder);   \
-                                       
appendq(&__wind_global_rholder.__name##q, holder); \
-                                       obj->rqueue = 
&__wind_global_rholder.__name##q; \
-                               }                                       \
-                       } else                                          \
-                               xnlock_get_irqsave(&nklock, s);         \
+                       xnlock_get_irqsave(&nklock, s);                 \
+                       if (unlikely(err) &&                            \
+                           (obj->rqueue != &__wind_global_rholder.__name##q)) 
{ \
+                               removeq(obj->rqueue, holder);           \
+                               appendq(&__wind_global_rholder.__name##q, 
holder); \
+                               obj->rqueue = &__wind_global_rholder.__name##q; 
\
+                       }                                               \
                }                                                       \
                xnlock_put_irqrestore(&nklock, s);                      \
        } while(0)


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

Reply via email to