mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 07:02:03 -06:00
qemu: add qemu_free_irqs (Marcelo Tosatti)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6602 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
8871565764
commit
51bf9e7e18
2 changed files with 7 additions and 0 deletions
6
hw/irq.c
6
hw/irq.c
|
@ -56,6 +56,12 @@ qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qemu_free_irqs(qemu_irq *s)
|
||||||
|
{
|
||||||
|
qemu_free(s[0]);
|
||||||
|
qemu_free(s);
|
||||||
|
}
|
||||||
|
|
||||||
static void qemu_notirq(void *opaque, int line, int level)
|
static void qemu_notirq(void *opaque, int line, int level)
|
||||||
{
|
{
|
||||||
struct IRQState *irq = opaque;
|
struct IRQState *irq = opaque;
|
||||||
|
|
1
hw/irq.h
1
hw/irq.h
|
@ -27,6 +27,7 @@ static inline void qemu_irq_pulse(qemu_irq irq)
|
||||||
|
|
||||||
/* Returns an array of N IRQs. */
|
/* Returns an array of N IRQs. */
|
||||||
qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n);
|
qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n);
|
||||||
|
void qemu_free_irqs(qemu_irq *s);
|
||||||
|
|
||||||
/* Returns a new IRQ with opposite polarity. */
|
/* Returns a new IRQ with opposite polarity. */
|
||||||
qemu_irq qemu_irq_invert(qemu_irq irq);
|
qemu_irq qemu_irq_invert(qemu_irq irq);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue