[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/13] vmstate: add VMSTATE_BUFFER_TEST
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 03/13] vmstate: add VMSTATE_BUFFER_TEST |
Date: |
Wed, 14 Oct 2009 13:37:43 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
---
hw/hw.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 8c223f8..c379000 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -464,6 +464,15 @@ extern const VMStateInfo vmstate_info_buffer;
+ type_check_array(uint8_t,typeof_field(_state,
_field),sizeof(typeof_field(_state,_field))) \
}
+#define VMSTATE_STATIC_BUFFER_TEST(_field, _state, _test) { \
+ .name = (stringify(_field)), \
+ .field_exists = (_test), \
+ .size = sizeof(typeof_field(_state,_field)), \
+ .info = &vmstate_info_buffer, \
+ .flags = VMS_BUFFER, \
+ .offset = offsetof(_state, _field) \
+ + type_check_array(uint8_t,typeof_field(_state,
_field),sizeof(typeof_field(_state,_field))) \
+}
#define VMSTATE_BUFFER_START_MIDDLE(_field, _state, start) { \
.name = (stringify(_field)), \
.size = sizeof(typeof_field(_state,_field)) - start, \
@@ -613,6 +622,9 @@ extern const VMStateDescription vmstate_i2c_slave;
#define VMSTATE_BUFFER(_f, _s) \
VMSTATE_STATIC_BUFFER(_f, _s, 0)
+#define VMSTATE_BUFFER_TEST(_f, _s, _t) \
+ VMSTATE_STATIC_BUFFER_TEST(_f, _s, _t)
+
#ifdef NEED_CPU_H
#if TARGET_LONG_BITS == 64
#define VMSTATE_UINTTL_V(_f, _s, _v) \
--
1.6.2.5
- [Qemu-devel] [PATCH 00/13] Port ide to vmstate, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 01/13] ide: port idebus to vmstate, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 02/13] ide: change identify_data type to uint8_t, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 03/13] vmstate: add VMSTATE_BUFFER_TEST,
Juan Quintela <=
- [Qemu-devel] [PATCH 06/13] ide: add VMSTATE_IDE_BUS and VMSTATE_IDE_DRIVES, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 05/13] ide: microdrive cycle field is set as uint8_t, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 04/13] ide: port ide_drive to vmstate, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 08/13] ide: include bus in MMIOState, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 09/13] ide: port ide mmio to vmstate, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 07/13] ide: port microdrive to vmstate, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 10/13] ide: port isa ide to vmstate, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 12/13] ide: port pci ide to vmstate, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 13/13] ide: pre VMState functions are not needed anymore, Juan Quintela, 2009/10/14
- [Qemu-devel] [PATCH 11/13] ide: port pmac ide to vmstate, Juan Quintela, 2009/10/14