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: Gonglei
Subject: Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load
Date: Thu, 27 Nov 2014 19:16:25 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

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).

Thanks,
-Gonglei





reply via email to

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