mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
fe10ab540b
commit
bc72ad6754
121 changed files with 678 additions and 678 deletions
14
savevm.c
14
savevm.c
|
@ -97,18 +97,18 @@ static void qemu_announce_self_once(void *opaque)
|
|||
|
||||
if (--count) {
|
||||
/* delay 50ms, 150ms, 250ms, ... */
|
||||
qemu_mod_timer(timer, qemu_get_clock_ms(rt_clock) +
|
||||
timer_mod(timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME) +
|
||||
50 + (SELF_ANNOUNCE_ROUNDS - count - 1) * 100);
|
||||
} else {
|
||||
qemu_del_timer(timer);
|
||||
qemu_free_timer(timer);
|
||||
timer_del(timer);
|
||||
timer_free(timer);
|
||||
}
|
||||
}
|
||||
|
||||
void qemu_announce_self(void)
|
||||
{
|
||||
static QEMUTimer *timer;
|
||||
timer = qemu_new_timer_ms(rt_clock, qemu_announce_self_once, &timer);
|
||||
timer = timer_new_ms(QEMU_CLOCK_REALTIME, qemu_announce_self_once, &timer);
|
||||
qemu_announce_self_once(&timer);
|
||||
}
|
||||
|
||||
|
@ -993,9 +993,9 @@ void timer_get(QEMUFile *f, QEMUTimer *ts)
|
|||
|
||||
expire_time = qemu_get_be64(f);
|
||||
if (expire_time != -1) {
|
||||
qemu_mod_timer_ns(ts, expire_time);
|
||||
timer_mod_ns(ts, expire_time);
|
||||
} else {
|
||||
qemu_del_timer(ts);
|
||||
timer_del(ts);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2387,7 +2387,7 @@ void do_savevm(Monitor *mon, const QDict *qdict)
|
|||
qemu_gettimeofday(&tv);
|
||||
sn->date_sec = tv.tv_sec;
|
||||
sn->date_nsec = tv.tv_usec * 1000;
|
||||
sn->vm_clock_nsec = qemu_get_clock_ns(vm_clock);
|
||||
sn->vm_clock_nsec = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
|
||||
|
||||
if (name) {
|
||||
ret = bdrv_snapshot_find(bs, old_sn, name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue