qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 06/41] virtio: Use DO_UPCAST instead of a ca


From: Avi Kivity
Subject: Re: [Qemu-devel] Re: [PATCH 06/41] virtio: Use DO_UPCAST instead of a cast
Date: Thu, 03 Dec 2009 15:39:48 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4

On 12/03/2009 02:55 PM, Juan Quintela wrote:
sorry, already allocated memory.  basically -device foo
requires that qdev creates foo and then it call foo_init().

Alternatives:

- foo_init() allocates Foo and calls qdev_init() (how C++ works, but cumbersome here) - we put the offset of DeviceState as well as the size into DeviceInfo (a macro can help)

I agree the hidden assumptions about member placement are bad.

--
error compiling committee.c: too many arguments to function





reply via email to

[Prev in Thread] Current Thread [Next in Thread]