aboutsummaryrefslogtreecommitdiff
path: root/hw/ptimer.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-01-13 17:07:20 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-13 10:20:51 -0600
commit701a8f76aa5243d90a71935982c20c06d8e83b80 (patch)
tree0cd413bfa739326cb70b251d3ed2b698d0debb41 /hw/ptimer.h
parent49d4d9b63ebb0d487e80d3d85a75d8256d313df9 (diff)
vmstate: extract declarations out of hw/hw.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 69cdddc721..6638f61322 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