[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
- [Qemu-devel] [PATCH v4 0/8] Update the Netduino 2 Machine, Alistair Francis, 2016/07/23
- [Qemu-devel] [PATCH v4 1/8] STM32F205: Remove the individual device variables, Alistair Francis, 2016/07/23
- [Qemu-devel] [PATCH v4 2/8] STM32F2xx: Display PWM duty cycle from timer, Alistair Francis, 2016/07/23
- [Qemu-devel] [PATCH v4 3/8] STM32F2xx: Add the ADC device, Alistair Francis, 2016/07/23
- [Qemu-devel] [PATCH v4 4/8] STM32F2xx: Add the SPI device, Alistair Francis, 2016/07/23
- [Qemu-devel] [PATCH v4 5/8] irq: Add irq information getter functions,
Alistair Francis <=
- [Qemu-devel] [PATCH v4 8/8] MAINTAINERS: Add Alistair to the maintainers list, Alistair Francis, 2016/07/23
- Message not available