Features/QOM/CPU: Difference between revisions

From QEMU
m (Use proper markup for table header)
(Add comment on solution of described name conflict)
Line 36: Line 36:
|colspan="2"|macro to obtain class pointer
|colspan="2"|macro to obtain class pointer
|}
|}
Resolved by renaming existing CPUState to '''CPUArchState''' and by using struct '''CPUState''' for the object state,
while using '''CPU'''(obj) as macro for casting.

Revision as of 13:37, 23 March 2012

QOM CPU

"CPU" name conflict

Identifier current interim final
struct CPU$archState or
struct CPUState_$arch
defined in target-*/cpu.h ???
#define CPUState alias to CPU$archState / CPUState_$arch dropped in favor of CPU
struct CPUClass class
#define CPU_CLASS(class) cast macro for class
struct CPU object
#define CPU(obj) cast macro for object
#define CPU_GET_CLASS(obj) macro to obtain class pointer

Resolved by renaming existing CPUState to CPUArchState and by using struct CPUState for the object state, while using CPU(obj) as macro for casting.