[PATCH 1/6] hidclass.sys: Add a processing thread for HID devices

Aric Stewart aric at codeweavers.com
Fri Oct 9 07:53:59 CDT 2015

On 10/8/15 3:03 PM, Nikolay Sivov wrote:
> On 08.10.2015 22:34, Aric Stewart wrote:
>> +        buffer_size = RingBuffer_GetBufferSize(ext->ring_buffer);
>> +        RingBuffer_Read(ext->ring_buffer, ptr, packet, &buffer_size);
> No idea what's going on there, but first call seems to be redundant. Also maybe it makes sense to make RingBuffer_Read return size since it's out-only argument right now?

What is happening is that the buffer_size can be set to 0 by RingBuffer_Read if there is nothing to read so it needs to be sure to be reset before each call since it is in a loop. 

Yeah, currently it is a VOID return, I think I had plans for the return code to be an error code but ended up not needing that. 

I could restructure it a bit so that is the case if you felt like that was better. Personally i feel like it is pretty much the same either way.


More information about the wine-devel mailing list