hidclass.sys: Properly quit hid_device_thread when both completion event and halt event are signaled (try 2)

Sebastian Lackner sebastian at fds-team.de
Wed Jan 6 23:23:12 CST 2016


On 07.01.2016 06:07, Qian Hong wrote:
> The patch looks good to me, Aric, would you mind sign off the patch?
> 
> I'm glad to sign off, but I'm not qualified enough :)
> 
> On Tue, Dec 29, 2015 at 11:19 AM, Changhui LIU
> <liuchanghui at linuxdeepin.com> wrote:
>> Superseded patch 117285.
>>
>> Try 2: Fixed  IRP completion event will not be signaled if  a driver is
>> misbehaving and is blocked or crashes while processing an IRP.
>>

Wouldn't it be easier to just swap events[0] <-> events[1], to handle the
exit event with higher priority? I do not see any real need for two calls
to Wait*() functions.

Also, please note that your example above is not really a good one. If the
driver is blocked / crashed somehow, then events[0] will never be signaled,
so we don't have to care about both events signaled at the same time.
The only situation where this matters is when requests are processed too fast.




More information about the wine-devel mailing list