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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Mar  4 23:01:47 2010 +0100

posix: do not uselessly detach IRQ descriptor before deletion

xnintr_destroy() implicitly detaches the deleted IRQ descriptor when
necessary.

---

 ksrc/skins/posix/intr.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ksrc/skins/posix/intr.c b/ksrc/skins/posix/intr.c
index fd31946..a694ed9 100644
--- a/ksrc/skins/posix/intr.c
+++ b/ksrc/skins/posix/intr.c
@@ -166,14 +166,13 @@ static int pse51_intr_detach_inner(pthread_intr_t intr, 
pse51_kqueues_t *q, int
 
        xnlock_put_irqrestore(&nklock, s);
 
-       xnintr_detach(&intr->intr_base);
        xnintr_destroy(&intr->intr_base);
 
+       xnfree(intr);
+
        if (rc == XNSYNCH_RESCHED)
                xnpod_schedule();
 
-       xnfree(intr);
-
        return 0;
 }
 


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

Reply via email to