On 2015/6/4 23:17, Shannon Zhao wrote:


On 2015/6/4 22:57, Michael Tokarev wrote:
04.06.2015 17:51, Shannon Zhao wrote:
>Yeah, but I think something like below would work.
>
>     cpu_exit_irq = &qemu_allocate_irq(cpu_request_exit, NULL, 0);
>     DMA_init(0, cpu_exit_irq);
NO!!!:)

Oh, will rethink about it. But I think maybe it's unnecessary to fix it
as it actually requires a pointer which stores qemu_irq.

And if we want to use qemu_allocate_irq here, it will be something like:

cpu_exit_irq = g_new(qemu_irq, 1);
cpu_exit_irq[0] = qemu_allocate_irq(cpu_request_exit, NULL, 0);
DMA_init(0, cpu_exit_irq);

This is what exactly qemu_allocate_irqs does.

Or we modify the DMA_init to make it take qemu_irq as parameter not qemu_irq *

--
Shannon

Reply via email to