From patchwork Fri Oct 9 06:28:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [V5,22/29] vmstate: add VMSTATE_ARRAY_POINTER for pointer to array. Date: Thu, 08 Oct 2009 20:28:55 -0000 From: Isaku Yamahata X-Patchwork-Id: 35596 Message-Id: <1255069742-15724-23-git-send-email-yamahata@valinux.co.jp> To: qemu-devel@nongnu.org, mst@redhat.com Cc: yamahata@valinux.co.jp add VMSTATE_ARRAY_POINTER for pointer to array. This will be used later. Signed-off-by: Isaku Yamahata --- hw/hw.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 8c223f8..e867af4 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -389,6 +389,16 @@ extern const VMStateInfo vmstate_info_buffer; + type_check_array(_type,typeof_field(_state, _field),_num) \ } +#define VMSTATE_ARRAY_POINTER(_field, _state, _version, _info, _type, _size) { \ + .name = (stringify(_field)), \ + .version_id = (_version), \ + .size = (_size), \ + .info = &(_info), \ + .flags = VMS_SINGLE | VMS_POINTER, \ + .offset = offsetof(_state, _field) \ + + type_check(_type,typeof_field(_state, _field)) \ +} + #define VMSTATE_VARRAY(_field, _state, _field_num, _version, _info, _type) {\ .name = (stringify(_field)), \ .version_id = (_version), \