Revision 22ec3283

b/hw/irq.c
90 90
    s[1] = irq2;
91 91
    return qemu_allocate_irqs(qemu_splitirq, s, 1)[0];
92 92
}
93

  
94
static void proxy_irq_handler(void *opaque, int n, int level)
95
{
96
    qemu_irq **target = opaque;
97

  
98
    if (*target) {
99
        qemu_set_irq((*target)[n], level);
100
    }
101
}
102

  
103
qemu_irq *qemu_irq_proxy(qemu_irq **target, int n)
104
{
105
    return qemu_allocate_irqs(proxy_irq_handler, target, n);
106
}
b/hw/irq.h
33 33
/* Returns a new IRQ which feeds into both the passed IRQs */
34 34
qemu_irq qemu_irq_split(qemu_irq irq1, qemu_irq irq2);
35 35

  
36
/* Returns a new IRQ set which connects 1:1 to another IRQ set, which
37
 * may be set later.
38
 */
39
qemu_irq *qemu_irq_proxy(qemu_irq **target, int n);
40

  
36 41
#endif

Also available in: Unified diff