[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [COMMIT 840e9ce] vmstate: create VMSTATE_STRUCT_POINTER
From: |
Anthony Liguori |
Subject: |
[Qemu-commits] [COMMIT 840e9ce] vmstate: create VMSTATE_STRUCT_POINTER |
Date: |
Mon, 05 Oct 2009 14:52:56 -0000 |
From: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/hw/hw.h b/hw/hw.h
index 3796457..51154ab 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -387,6 +387,15 @@ extern const VMStateInfo vmstate_info_buffer;
+ type_check(_type,typeof_field(_state, _field)) \
}
+#define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type) { \
+ .name = (stringify(_field)), \
+ .vmsd = &(_vmsd), \
+ .size = sizeof(_type), \
+ .flags = VMS_STRUCT|VMS_POINTER, \
+ .offset = offsetof(_state, _field) \
+ + type_check(_type,typeof_field(_state, _field)) \
+}
+
#define VMSTATE_STRUCT_ARRAY(_field, _state, _num, _version, _vmsd, _type) { \
.name = (stringify(_field)), \
.num = (_num), \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [COMMIT 840e9ce] vmstate: create VMSTATE_STRUCT_POINTER,
Anthony Liguori <=