[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] smc91x irq patch
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] smc91x irq patch |
Date: |
Wed, 19 Jul 2006 19:15:59 +0100 |
User-agent: |
KMail/1.9.3 |
> > There's no point passing round both a pic callback and an object when we
> > can embed the callback in the object.
>
> I don't think that adding a callback is bad. It can be useful to use the
> device with another CPU or IRQ controller for example.
It means all the device emulation code has got to keep track of three bits of
information rather than two, which seems silly when the callback and the
object are inherently linked. I can't think of any cases where the callback
is not be implied by the object.
> In fact, I would like to go further by adding a type such as
> "QEMUSignal" which could be used for IRQs or any other I/Os. Then you
> can pass it to devices. You can used qemu_signal_set(QEMUSignal *signal,
> int level) to set the level and add listeners to get notified on the
> changes with something like: qemu_add_signal_cb(QEMUSignal *signal, void
> (*cb)(void *opaque), void *opaque).
Extending the arm_pic code to work with all targets on my list of things to
do.
Paul