mirror of https://github.com/xemu-project/xemu.git
utils/fifo8: add VMSTATE_FIFO8_TEST macro
Rewrite the existing VMSTATE_FIFO8 macro to use VMSTATE_FIFO8_TEST as per the standard pattern in include/migration/vmstate.h. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20210128221728.14887-3-mark.cave-ayland@ilande.co.uk>
This commit is contained in:
parent
f71407ed2f
commit
cdf01ca481
|
@ -148,12 +148,16 @@ uint32_t fifo8_num_used(Fifo8 *fifo);
|
||||||
|
|
||||||
extern const VMStateDescription vmstate_fifo8;
|
extern const VMStateDescription vmstate_fifo8;
|
||||||
|
|
||||||
#define VMSTATE_FIFO8(_field, _state) { \
|
#define VMSTATE_FIFO8_TEST(_field, _state, _test) { \
|
||||||
.name = (stringify(_field)), \
|
.name = (stringify(_field)), \
|
||||||
.size = sizeof(Fifo8), \
|
.field_exists = (_test), \
|
||||||
.vmsd = &vmstate_fifo8, \
|
.size = sizeof(Fifo8), \
|
||||||
.flags = VMS_STRUCT, \
|
.vmsd = &vmstate_fifo8, \
|
||||||
.offset = vmstate_offset_value(_state, _field, Fifo8), \
|
.flags = VMS_STRUCT, \
|
||||||
|
.offset = vmstate_offset_value(_state, _field, Fifo8), \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define VMSTATE_FIFO8(_field, _state) \
|
||||||
|
VMSTATE_FIFO8_TEST(_field, _state, NULL)
|
||||||
|
|
||||||
#endif /* QEMU_FIFO8_H */
|
#endif /* QEMU_FIFO8_H */
|
||||||
|
|
Loading…
Reference in New Issue