summaryrefslogtreecommitdiffstats
path: root/hw/ptimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ptimer.h')
-rw-r--r--hw/ptimer.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/ptimer.h b/hw/ptimer.h
index 69cdddc..6638f61 100644
--- a/hw/ptimer.h
+++ b/hw/ptimer.h
@@ -10,6 +10,7 @@
#include "qemu-common.h"
#include "qemu-timer.h"
+#include "vmstate.h"
/* ptimer.c */
typedef struct ptimer_state ptimer_state;
@@ -24,4 +25,15 @@ void ptimer_set_count(ptimer_state *s, uint64_t count);
void ptimer_run(ptimer_state *s, int oneshot);
void ptimer_stop(ptimer_state *s);
+extern const VMStateDescription vmstate_ptimer;
+
+#define VMSTATE_PTIMER(_field, _state) { \
+ .name = (stringify(_field)), \
+ .version_id = (1), \
+ .vmsd = &vmstate_ptimer, \
+ .size = sizeof(ptimer_state *), \
+ .flags = VMS_STRUCT|VMS_POINTER, \
+ .offset = vmstate_offset_pointer(_state, _field, ptimer_state), \
+}
+
#endif
OpenPOWER on IntegriCloud