From a1f05e79f2c207bded5efc23e8c6b1ca58161a8e Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 17 Dec 2013 19:42:37 +0000 Subject: vmstate: Add support for an array of ptimer_state * Add support for defining a vmstate field which is an array of pointers to structures, and use this to define a VMSTATE_PTIMER_ARRAY() which allows an array of ptimer_state* to be used by devices. Signed-off-by: Peter Maydell Message-id: 1387159292-10436-2-git-send-email-lig.fnst@cn.fujitsu.com --- include/hw/ptimer.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw') diff --git a/include/hw/ptimer.h b/include/hw/ptimer.h index 28fcaf1..a33edf4 100644 --- a/include/hw/ptimer.h +++ b/include/hw/ptimer.h @@ -36,4 +36,8 @@ extern const VMStateDescription vmstate_ptimer; .offset = vmstate_offset_pointer(_state, _field, ptimer_state), \ } +#define VMSTATE_PTIMER_ARRAY(_f, _s, _n) \ + VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(_f, _s, _n, 0, \ + vmstate_ptimer, ptimer_state) + #endif -- cgit v1.1