Add more VMSTATE_*_TEST variants for integers
Currently, vmstate.h includes helper macro variants for 8, 16 and 32-bit unsigned integers which include a "test" function which can selectively enable or disable the field's presence in the migration stream. There aren't similar helpers for 64-bit unsigned integers, or any size of signed integers. This patch remedies this. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
8e099d14f5
commit
87774a4a42
@ -635,6 +635,18 @@ extern const VMStateInfo vmstate_info_bitmap;
|
|||||||
#define VMSTATE_INT32_POSITIVE_LE(_f, _s) \
|
#define VMSTATE_INT32_POSITIVE_LE(_f, _s) \
|
||||||
VMSTATE_SINGLE(_f, _s, 0, vmstate_info_int32_le, int32_t)
|
VMSTATE_SINGLE(_f, _s, 0, vmstate_info_int32_le, int32_t)
|
||||||
|
|
||||||
|
#define VMSTATE_INT8_TEST(_f, _s, _t) \
|
||||||
|
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int8, int8_t)
|
||||||
|
|
||||||
|
#define VMSTATE_INT16_TEST(_f, _s, _t) \
|
||||||
|
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int16, int16_t)
|
||||||
|
|
||||||
|
#define VMSTATE_INT32_TEST(_f, _s, _t) \
|
||||||
|
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int32, int32_t)
|
||||||
|
|
||||||
|
#define VMSTATE_INT64_TEST(_f, _s, _t) \
|
||||||
|
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int64, int64_t)
|
||||||
|
|
||||||
#define VMSTATE_UINT8_TEST(_f, _s, _t) \
|
#define VMSTATE_UINT8_TEST(_f, _s, _t) \
|
||||||
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint8, uint8_t)
|
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint8, uint8_t)
|
||||||
|
|
||||||
@ -644,6 +656,9 @@ extern const VMStateInfo vmstate_info_bitmap;
|
|||||||
#define VMSTATE_UINT32_TEST(_f, _s, _t) \
|
#define VMSTATE_UINT32_TEST(_f, _s, _t) \
|
||||||
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint32, uint32_t)
|
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint32, uint32_t)
|
||||||
|
|
||||||
|
#define VMSTATE_UINT64_TEST(_f, _s, _t) \
|
||||||
|
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint64, uint64_t)
|
||||||
|
|
||||||
|
|
||||||
#define VMSTATE_FLOAT64_V(_f, _s, _v) \
|
#define VMSTATE_FLOAT64_V(_f, _s, _v) \
|
||||||
VMSTATE_SINGLE(_f, _s, _v, vmstate_info_float64, float64)
|
VMSTATE_SINGLE(_f, _s, _v, vmstate_info_float64, float64)
|
||||||
|
Loading…
Reference in New Issue
Block a user