mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
vmstate: Add support for an array of ptimer_state *
Add support for defining a vmstate field which is an array of pointers to structures, and use this to define a VMSTATE_PTIMER_ARRAY() which allows an array of ptimer_state* to be used by devices. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1387159292-10436-2-git-send-email-lig.fnst@cn.fujitsu.com
This commit is contained in:
parent
9082f12173
commit
a1f05e79f2
2 changed files with 14 additions and 0 deletions
|
@ -339,6 +339,16 @@ extern const VMStateInfo vmstate_info_bitmap;
|
|||
.offset = vmstate_offset_array(_state, _field, _type, _num), \
|
||||
}
|
||||
|
||||
#define VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(_f, _s, _n, _v, _vmsd, _type) { \
|
||||
.name = (stringify(_f)), \
|
||||
.version_id = (_v), \
|
||||
.num = (_n), \
|
||||
.vmsd = &(_vmsd), \
|
||||
.size = sizeof(_type *), \
|
||||
.flags = VMS_ARRAY|VMS_STRUCT|VMS_ARRAY_OF_POINTER, \
|
||||
.offset = vmstate_offset_array(_s, _f, _type*, _n), \
|
||||
}
|
||||
|
||||
#define VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _num, _test, _version, _vmsd, _type) { \
|
||||
.name = (stringify(_field)), \
|
||||
.num = (_num), \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue