qemu-devel@nongnu.org
[Top] [All Lists]

Re: [Qemu-devel] [RFC] Introduce module API to QEMU

Subject: Re: [Qemu-devel] [RFC] Introduce module API to QEMU
From: Anthony Liguori
Date: Fri, 03 Apr 2009 11:15:52 -0500
Avi Kivity wrote:
Anthony Liguori wrote:

Hmm, this raises annother issue - we've got to be extremely careful about ordering. It's not inconcievable that the PCI support code would have constructors (e.g. to register a PCI bus type).

Looks like constructor/destructor has explicit support for ordering. Neat.

I'd avoid it. Have the constructor do a *pci_module_table++ = blah and iterate through that later.

Yup, came to that conclusion too.

Regards,

Anthony Liguori

I prefer to have the code explicit somewhere rather than gobs of unportable magic. Use it where you have to, but not elsewhere.





<Prev in Thread] Current Thread [Next in Thread>