How to finish implementing serial port read interval timeouts?

Alex Henrie alexhenrie24 at gmail.com
Tue May 24 00:01:21 CDT 2016


Alexandre,

A problem with serial port read interval timeouts was brought up in
bug 40540.[1] The code that you wrote [2] works great for some
applications, but it does not help others. The problem is that the
read interval timer needs to be started immediately if ReadFile is
able to read any data from the serial port buffer, rather than waiting
for more data to arrive before starting the timer.

It seems to me that NtReadFile [3] needs to tell serial_queue_async
[4] if it read anything from the serial port before it sent the
asynchronous read request to the Wineserver. If anything was read,
serial_queue_async needs to start the read interval timer. Otherwise,
serial_reselect_async should be the one to start the timer like it is
now.

I could hack something in to achieve the desired behavior, but before
I submit anything, I wanted to ask your opinion on how it should be
done.

-Alex

[1] https://bugs.winehq.org/show_bug.cgi?id=40540
[2] https://source.winehq.org/git/wine.git/commitdiff/bc0bf9e505922b81df1c317d6493665bbe946554
[3] https://source.winehq.org/git/wine.git/blob/698d4114677205c3e5a0df659d230fe982578757:/dlls/ntdll/file.c#l800
[4] https://source.winehq.org/git/wine.git/blob/698d4114677205c3e5a0df659d230fe982578757:/server/serial.c#l187



More information about the wine-devel mailing list