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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Jan 11 17:30:45 2010 +0100

blackfin: use rthal_irqdesc_lock/unlock()

---

 ksrc/arch/blackfin/hal.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/ksrc/arch/blackfin/hal.c b/ksrc/arch/blackfin/hal.c
index 5884b77..e2a9f89 100644
--- a/ksrc/arch/blackfin/hal.c
+++ b/ksrc/arch/blackfin/hal.c
@@ -348,12 +348,16 @@ int rthal_irq_host_request(unsigned irq,
            rthal_irq_descp(irq) == NULL)
                return -EINVAL;
 
+       rthal_irqdesc_lock(irq, flags);
+
        if (rthal_linux_irq[irq].count++ == 0 && rthal_irq_descp(irq)->action) {
                rthal_linux_irq[irq].flags =
                    rthal_irq_descp(irq)->action->flags;
                rthal_irq_descp(irq)->action->flags |= IRQF_SHARED;
        }
 
+       rthal_irqdesc_unlock(irq, flags);
+
        return request_irq(irq, handler, IRQF_SHARED, name, dev_id);
 }
 
@@ -366,10 +370,14 @@ int rthal_irq_host_release(unsigned irq, void *dev_id)
 
        free_irq(irq, dev_id);
 
+       rthal_irqdesc_lock(irq, flags);
+
        if (--rthal_linux_irq[irq].count == 0 && rthal_irq_descp(irq)->action)
                rthal_irq_descp(irq)->action->flags =
                    rthal_linux_irq[irq].flags;
 
+       rthal_irqdesc_unlock(irq, flags);
+
        return 0;
 }
 


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

Reply via email to