diff options
Diffstat (limited to 'hw/irq.c')
-rw-r--r-- | hw/irq.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -90,3 +90,17 @@ qemu_irq qemu_irq_split(qemu_irq irq1, qemu_irq irq2) s[1] = irq2; return qemu_allocate_irqs(qemu_splitirq, s, 1)[0]; } + +static void proxy_irq_handler(void *opaque, int n, int level) +{ + qemu_irq **target = opaque; + + if (*target) { + qemu_set_irq((*target)[n], level); + } +} + +qemu_irq *qemu_irq_proxy(qemu_irq **target, int n) +{ + return qemu_allocate_irqs(proxy_irq_handler, target, n); +} |