|
From: | Avi Kivity |
Subject: | Re: [Qemu-devel] [PATCH v4 26/39] pcnet: convert to memory API |
Date: | Tue, 09 Aug 2011 15:52:59 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 |
On 08/09/2011 03:48 PM, Michael S. Tsirkin wrote:
> > But in some cases, we can't, and the it's a pain having to wrap > MemoryRegion in another structure containing an opaque. I guess, even though that wrapping structure would use a proper type, not an opaque.
Yes, of course - that's what the first version did.
> Maybe a good compromise is to: > > - keep MemoryRegion::opaque > - pass a MemoryRegion *mr to callbacks instead of opaque > - use container_of() when possible > - use mr->opaque otherwise Right. This even saves a memory dereference when opaque is unused.
I'll put this on the TODO (as well as writing the TODO). -- error compiling committee.c: too many arguments to function
[Prev in Thread] | Current Thread | [Next in Thread] |