On Aug 02 2013, liu ping fan wrote:
> On Thu, Aug 1, 2013 at 10:28 PM, Paolo Bonzini <pbonz...@redhat.com> wrote:
> > > > > > So actually there is another problem with this patch (both the
> > > > > > condvar and the event approach are equally buggy).  If a timer
> > > > > > on clock X disables clock X, qemu_clock_enable will deadlock.
> >
> > Checking the code for callers of qemu_clock_enable() it seems like there
> > shouldn't be any deadlocks.  So it should work if qemu_clock_enable
> 
> Do you mean the caller of qemu_clock_enable(foo,false) can NOT be
> timer cb?

Yes.

> As for this deadlock issue, making
> qemu_clock_enable(foo,false) ASYNC, and forcing the caller to sync
> explicitly ?

Right now the callers of qemu_clock_enable(foo, false) are safe.  So
the problem can be "fixed" just by adequate documentation.

> > But we should document the expectations since they are different from
> > the current code.
> >
> > Paolo

Reply via email to