From: Luc Michel Date: Sat, 10 Oct 2020 13:57:45 +0000 (+0200) Subject: hw/core/clock: provide the VMSTATE_ARRAY_CLOCK macro X-Git-Tag: v5.2.0-rc0~21^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6f3c9b0f783d47ffab961ea18685e30a85f5818;p=thirdparty%2Fqemu.git hw/core/clock: provide the VMSTATE_ARRAY_CLOCK macro Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Damien Hedde Signed-off-by: Luc Michel Tested-by: Guenter Roeck Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- diff --git a/include/hw/clock.h b/include/hw/clock.h index cbc5e6ced1e..81bcf3e505a 100644 --- a/include/hw/clock.h +++ b/include/hw/clock.h @@ -81,6 +81,11 @@ extern const VMStateDescription vmstate_clock; VMSTATE_CLOCK_V(field, state, 0) #define VMSTATE_CLOCK_V(field, state, version) \ VMSTATE_STRUCT_POINTER_V(field, state, version, vmstate_clock, Clock) +#define VMSTATE_ARRAY_CLOCK(field, state, num) \ + VMSTATE_ARRAY_CLOCK_V(field, state, num, 0) +#define VMSTATE_ARRAY_CLOCK_V(field, state, num, version) \ + VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(field, state, num, version, \ + vmstate_clock, Clock) /** * clock_setup_canonical_path: