|
From: | Avi Kivity |
Subject: | [Qemu-devel] Re: [PATCH 21/21] provide an opaque for accelerator in cpu state |
Date: | Thu, 16 Oct 2008 11:26:54 +0200 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080723) |
Glauber Costa wrote:
Convert kqemu to use it. We also provide a small macro to easy the access to the accelerator fields.+#define accel_opaque_field(env, type, field) ((type *)env->accel_opaque)->field+
Since we already allow the accelerator to customize the allocation of CPUState, why is this needed?
For example, kqemu would allocate a KqemuCPUState (which has a CPUState field, which is the return value), and use container_of() to get to the kqemu-specific fields.
-- error compiling committee.c: too many arguments to function
[Prev in Thread] | Current Thread | [Next in Thread] |