qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH qom v2 4/4] irq: Slim conversion of qemu_irq to


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [PATCH qom v2 4/4] irq: Slim conversion of qemu_irq to QOM
Date: Thu, 19 Jun 2014 14:57:26 +1000

On Thu, Jun 19, 2014 at 12:40 AM, Paolo Bonzini <address@hidden> wrote:
> Il 18/06/2014 09:57, Peter Crosthwaite ha scritto:
>
>> @@ -63,7 +68,7 @@ qemu_irq qemu_allocate_irq(qemu_irq_handler handler,
>> void *opaque, int n)
>>  {
>>      struct IRQState *irq;
>>
>> -    irq = g_new(struct IRQState, 1);
>> +    irq = IRQ(object_new(TYPE_IRQ));
>>      irq->handler = handler;
>>      irq->opaque = opaque;
>>      irq->n = n;
>> @@ -82,7 +87,7 @@ void qemu_free_irqs(qemu_irq *s, int n)
>>
>>  void qemu_free_irq(qemu_irq irq)
>>  {
>> -    g_free(irq);
>> +    object_unref(OBJECT(irq));
>>  }
>>
>>  static void qemu_notirq(void *opaque, int line, int level)
>
>
> If the next step is to add an "owner" like the one in MemoryRegion, and
> change occurrences of qemu_free_irq to object_unparent,

Sure, I guess its a tree wide much like the one for Memory API though.
Can we do it as follow up though and sneak this through for 2.1?

Regards,
Peter

> then
>
> Acked-by: Paolo Bonzini <address@hidden>
>
> Paolo
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]