On Fri, Dec 08, 2017 at 11:55:51AM +0100, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > util/qemu-timer.c | 84 > +++++++++++++++++++++++++++---------------------------- > 1 file changed, 42 insertions(+), 42 deletions(-) > > diff --git a/util/qemu-timer.c b/util/qemu-timer.c > index 82d56507a2..7a99e0e336 100644 > --- a/util/qemu-timer.c > +++ b/util/qemu-timer.c > @@ -192,14 +192,11 @@ bool timerlist_expired(QEMUTimerList *timer_list) > return false; > } > > - qemu_mutex_lock(&timer_list->active_timers_lock); > + QEMU_LOCK_GUARD(QemuMutex, timers_guard, > &timer_list->active_timers_lock);
It's not obvious to me that calling qemu_lock_get_ns() below with active_timers_lock held is a good idea. Using QEMU_WITH_LOCK() seems like the clearer and safer option than QEMU_LOCK_GUARD().
signature.asc
Description: PGP signature