qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v4 5/8] irq: Add irq information getter functions


From: Alistair Francis
Subject: [Qemu-devel] [PATCH v4 5/8] irq: Add irq information getter functions
Date: Sat, 23 Jul 2016 09:42:25 -0700

Add two functions one to get the irq handler function and another to get the
opaque data from a qemu_irq.

Signed-off-by: Alistair Francis <address@hidden>
---

 hw/core/irq.c    | 10 ++++++++++
 include/hw/irq.h |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/hw/core/irq.c b/hw/core/irq.c
index 49ff2e6..026200e 100644
--- a/hw/core/irq.c
+++ b/hw/core/irq.c
@@ -91,6 +91,16 @@ void qemu_free_irq(qemu_irq irq)
     object_unref(OBJECT(irq));
 }
 
+qemu_irq_handler qemu_irq_get_handler(qemu_irq irq)
+{
+    return irq->handler;
+}
+
+void *qemu_irq_get_opaque(qemu_irq irq)
+{
+    return irq->opaque;
+}
+
 static void qemu_notirq(void *opaque, int line, int level)
 {
     struct IRQState *irq = opaque;
diff --git a/include/hw/irq.h b/include/hw/irq.h
index 4c4c2ea..934a8f5 100644
--- a/include/hw/irq.h
+++ b/include/hw/irq.h
@@ -27,6 +27,10 @@ static inline void qemu_irq_pulse(qemu_irq irq)
     qemu_set_irq(irq, 0);
 }
 
+qemu_irq_handler qemu_irq_get_handler(qemu_irq irq);
+
+void *qemu_irq_get_opaque(qemu_irq irq);
+
 /* Returns an array of N IRQs. Each IRQ is assigned the argument handler and
  * opaque data.
  */
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]