ptimer.c (95a9457fd44ad97c518858a4e1586a5498f9773c) ptimer.c (b01422622b7c7293196fdaf1dbb4f495af44ecf9)
1/*
2 * General purpose implementation of a simple periodic countdown timer.
3 *
4 * Copyright (c) 2007 CodeSourcery.
5 *
6 * This code is licensed under the GNU LGPL.
7 */
8

--- 344 unchanged lines hidden (view full) ---

353 VMSTATE_INT64(period, ptimer_state),
354 VMSTATE_INT64(last_event, ptimer_state),
355 VMSTATE_INT64(next_event, ptimer_state),
356 VMSTATE_TIMER_PTR(timer, ptimer_state),
357 VMSTATE_END_OF_LIST()
358 }
359};
360
1/*
2 * General purpose implementation of a simple periodic countdown timer.
3 *
4 * Copyright (c) 2007 CodeSourcery.
5 *
6 * This code is licensed under the GNU LGPL.
7 */
8

--- 344 unchanged lines hidden (view full) ---

353 VMSTATE_INT64(period, ptimer_state),
354 VMSTATE_INT64(last_event, ptimer_state),
355 VMSTATE_INT64(next_event, ptimer_state),
356 VMSTATE_TIMER_PTR(timer, ptimer_state),
357 VMSTATE_END_OF_LIST()
358 }
359};
360
361ptimer_state *ptimer_init(QEMUBH *bh, uint8_t policy_mask)
361ptimer_state *ptimer_init_with_bh(QEMUBH *bh, uint8_t policy_mask)
362{
363 ptimer_state *s;
364
365 s = (ptimer_state *)g_malloc0(sizeof(ptimer_state));
366 s->bh = bh;
367 s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, ptimer_tick, s);
368 s->policy_mask = policy_mask;
369

--- 16 unchanged lines hidden ---
362{
363 ptimer_state *s;
364
365 s = (ptimer_state *)g_malloc0(sizeof(ptimer_state));
366 s->bh = bh;
367 s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, ptimer_tick, s);
368 s->policy_mask = policy_mask;
369

--- 16 unchanged lines hidden ---