From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: [patch 20/24] QEMU/KVM: add qemu_free_irqs Date: Tue, 11 Mar 2008 17:12:11 -0300 Message-ID: <20080311201418.803148796@localhost.localdomain> References: <20080311201151.959635433@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti To: qemu-devel@nongnu.org, kvm-devel@lists.sourceforge.net Return-path: Content-Disposition: inline; filename=qemu-free-irqs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Signed-off-by: Marcelo Tosatti Index: kvm-userspace.hotplug2/qemu/hw/irq.c =================================================================== --- kvm-userspace.hotplug2.orig/qemu/hw/irq.c +++ kvm-userspace.hotplug2/qemu/hw/irq.c @@ -56,6 +56,12 @@ qemu_irq *qemu_allocate_irqs(qemu_irq_ha 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; Index: kvm-userspace.hotplug2/qemu/hw/irq.h =================================================================== --- kvm-userspace.hotplug2.orig/qemu/hw/irq.h +++ kvm-userspace.hotplug2/qemu/hw/irq.h @@ -28,6 +28,8 @@ static inline void qemu_irq_pulse(qemu_i /* 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); -- ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/