qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load
Date: Thu, 27 Nov 2014 12:19:13 +0100

On Do, 2014-11-27 at 19:16 +0800, Gonglei wrote:
> On 2014/11/27 19:04, Gerd Hoffmann wrote:
> 
> >   Hi,
> > 
> >>> +        evt = s->ptr.queue[(s->head+s->n) & QUEUE_MASK];
> >>
> >> s->n is QUEUE_LENGTH, can we directly delete it?
> >>   evt = s->ptr.queue[s->head & QUEUE_MASK]
> > 
> > I prefer to make clear in the code that we want the last ring element
> > not the first and leave in the "+n", even if we could take it out.
> > 
> OK.
> 
> Another question, whether or not we handle this scenario
> before calling hid_set_next_idle(s) ? Maybe it is safer, because
> hid_idle_timer will call  hid_pointer_event(), callback function
> of hs->event(hs).

Not needed, the timer will not called before vmload is completely
finished.

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]