From: aliguori Date: Wed, 11 Feb 2009 15:21:04 +0000 (+0000) Subject: qemu: add qemu_free_irqs (Marcelo Tosatti) X-Git-Tag: xen-3.4.0-rc2~12^2~83 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=51bf9e7e1870996ae7f4741530e6134b485de321;p=qemu-xen-3.4-testing.git qemu: add qemu_free_irqs (Marcelo Tosatti) Signed-off-by: Marcelo Tosatti Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6602 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/hw/irq.c b/hw/irq.c index eca707dd..7703f62c 100644 --- a/hw/irq.c +++ b/hw/irq.c @@ -56,6 +56,12 @@ qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n) 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) { struct IRQState *irq = opaque; diff --git a/hw/irq.h b/hw/irq.h index 0880ad21..5daae449 100644 --- a/hw/irq.h +++ b/hw/irq.h @@ -27,6 +27,7 @@ static inline void qemu_irq_pulse(qemu_irq irq) /* Returns an array of N IRQs. */ 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. */ qemu_irq qemu_irq_invert(qemu_irq irq);