|
From: | Paul Brook |
Subject: | Re: [Qemu-devel] [patch 1/2] Pass QEMUIOWorker to qemu_notify_event |
Date: | Thu, 25 Mar 2010 21:06:00 +0000 |
User-agent: | KMail/1.12.4 (Linux/2.6.32-trunk-amd64; KDE/4.3.4; x86_64; ; ) |
> /* Force QEMU to process pending events */ > -void qemu_notify_event(void); > +void qemu_notify_event(QEMUIOWorker *worker); > static void handle_input(VirtIODevice *vdev, VirtQueue *vq) > { > + qemu_notify_event(main_io_worker); > } This feels completely wrong. Devices shouldn't know or care about implementation details like this. How is a device supposed to know which worker it should be waking up? qemu_notify_event is an ugly hack to workaround the fact that our character device API is polled. If shouldn't exist in the first place, instead we should have a proper mechanism for device emulation to notify the CharDriverState when it is ready to recieve more data. Paul
[Prev in Thread] | Current Thread | [Next in Thread] |