mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53: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
|
@ -85,8 +85,8 @@ static void hid_idle_timer(void *opaque)
|
|||
static void hid_del_idle_timer(HIDState *hs)
|
||||
{
|
||||
if (hs->idle_timer) {
|
||||
qemu_del_timer(hs->idle_timer);
|
||||
qemu_free_timer(hs->idle_timer);
|
||||
timer_del(hs->idle_timer);
|
||||
timer_free(hs->idle_timer);
|
||||
hs->idle_timer = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -94,12 +94,12 @@ static void hid_del_idle_timer(HIDState *hs)
|
|||
void hid_set_next_idle(HIDState *hs)
|
||||
{
|
||||
if (hs->idle) {
|
||||
uint64_t expire_time = qemu_get_clock_ns(vm_clock) +
|
||||
uint64_t expire_time = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) +
|
||||
get_ticks_per_sec() * hs->idle * 4 / 1000;
|
||||
if (!hs->idle_timer) {
|
||||
hs->idle_timer = qemu_new_timer_ns(vm_clock, hid_idle_timer, hs);
|
||||
hs->idle_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, hid_idle_timer, hs);
|
||||
}
|
||||
qemu_mod_timer_ns(hs->idle_timer, expire_time);
|
||||
timer_mod_ns(hs->idle_timer, expire_time);
|
||||
} else {
|
||||
hid_del_idle_timer(hs);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue