|
From: | Gerd Hoffmann |
Subject: | [Qemu-devel] Re: [PATCH 1/2] qemu/qdev: type safety in reset handler |
Date: | Wed, 16 Sep 2009 12:22:28 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 |
On 09/16/09 12:06, Michael S. Tsirkin wrote:
How about going one step further? Register *one* qdev_reset instance which then walks the qdev tree and calls ->reset() for every device?Will be much more code. Why not reuse the existing queue?
I think we'll need such a tree walker anyway sooner or later. Thus you'll get bonus points for making it generic, so it could be used for a -- say -- late_init() callback too.
Also the reset() callbacks order will be based on the position of the device in the tree instead of being more or less random.
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |