From 55a6e51f2a78536d605a6a00dfbec34227b2dd32 Mon Sep 17 00:00:00 2001 From: Blue Swirl <blauwirbel@gmail.com> Date: Mon, 31 Aug 2009 19:30:15 +0000 Subject: Add VMState support for ptimers Signed-off-by: Blue Swirl <blauwirbel@gmail.com> --- hw/ptimer.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'hw/ptimer.c') diff --git a/hw/ptimer.c b/hw/ptimer.c index f1994bd..a4343b6 100644 --- a/hw/ptimer.c +++ b/hw/ptimer.c @@ -212,6 +212,27 @@ void qemu_get_ptimer(QEMUFile *f, ptimer_state *s) qemu_get_timer(f, s->timer); } +static int get_ptimer(QEMUFile *f, void *pv, size_t size) +{ + ptimer_state *v = pv; + + qemu_get_ptimer(f, v); + return 0; +} + +static void put_ptimer(QEMUFile *f, const void *pv, size_t size) +{ + ptimer_state *v = (void *)pv; + + qemu_put_ptimer(f, v); +} + +const VMStateInfo vmstate_info_ptimer = { + .name = "ptimer", + .get = get_ptimer, + .put = put_ptimer, +}; + ptimer_state *ptimer_init(QEMUBH *bh) { ptimer_state *s; -- cgit v1.1