From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOLe2-0003et-2f for qemu-devel@nongnu.org; Tue, 24 Sep 2013 01:58:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOLdw-000481-Mx for qemu-devel@nongnu.org; Tue, 24 Sep 2013 01:58:46 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:36670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOLdw-00047m-Gf for qemu-devel@nongnu.org; Tue, 24 Sep 2013 01:58:40 -0400 Received: by mail-pb0-f48.google.com with SMTP id ma3so4127459pbc.35 for ; Mon, 23 Sep 2013 22:58:38 -0700 (PDT) Message-ID: <52412A08.4090009@ozlabs.ru> Date: Tue, 24 Sep 2013 15:58:32 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1378269326-23512-1-git-send-email-aik@ozlabs.ru> In-Reply-To: <1378269326-23512-1-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] migration: add version supporting macros for struct pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-devel@nongnu.org, =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Juan Quintela On 09/04/2013 02:35 PM, Alexey Kardashevskiy wrote: > This adds version supporting macros VMSTATE_STRUCT_POINTER_TEST_V > and VMSTATE_STRUCT_POINTER_V in addition to the already existing > VMSTATE_STRUCT_POINTER and VMSTATE_STRUCT_POINTER_TEST macros. Ping? > > Cc: Andreas Färber > Signed-off-by: Alexey Kardashevskiy > --- > include/migration/vmstate.h | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h > index 1c31b5d..9d09e60 100644 > --- a/include/migration/vmstate.h > +++ b/include/migration/vmstate.h > @@ -310,8 +310,18 @@ extern const VMStateInfo vmstate_info_bitmap; > .offset = vmstate_offset_value(_state, _field, _type), \ > } > > -#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type) { \ > +#define VMSTATE_STRUCT_POINTER_V(_field, _state, _version, _vmsd, _type) { \ > .name = (stringify(_field)), \ > + .version_id = (_version), \ > + .vmsd = &(_vmsd), \ > + .size = sizeof(_type), \ > + .flags = VMS_STRUCT|VMS_POINTER, \ > + .offset = vmstate_offset_value(_state, _field, _type), \ > +} > + > +#define VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, _version, _vmsd, _type) { \ > + .name = (stringify(_field)), \ > + .version_id = (_version), \ > .field_exists = (_test), \ > .vmsd = &(_vmsd), \ > .size = sizeof(_type), \ > @@ -497,7 +507,10 @@ extern const VMStateInfo vmstate_info_bitmap; > VMSTATE_STRUCT_TEST(_field, _state, NULL, _version, _vmsd, _type) > > #define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type) \ > - VMSTATE_STRUCT_POINTER_TEST(_field, _state, NULL, _vmsd, _type) > + VMSTATE_STRUCT_POINTER_V(_field, _state, 0, _vmsd, _type) > + > +#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type) \ > + VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, 0, _vmsd, _type) > > #define VMSTATE_STRUCT_ARRAY(_field, _state, _num, _version, _vmsd, _type) \ > VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _num, NULL, _version, \ > -- Alexey