[PATCH 2/2] ntdll: Make avail_mode always TRUE for serial ports.

Alexandre Julliard julliard at winehq.org
Tue Jan 12 07:30:26 CST 2016


Alex Henrie <alexhenrie24 at gmail.com> writes:

> Cc: Eric Pouech <eric.pouech at orange.fr>
> Cc: Sebastian Lackner <sebastian at fds-team.de>
>
> Fixes https://bugs.winehq.org/show_bug.cgi?id=39875
>
> avail_mode controls whether a read operation is considered a success as
> long as at least one byte can be read, or whether the operation is
> considered pending until the total number of requested bytes has been
> received. For serial ports, avail_mode was TRUE if read operations
> always finished immediately, and FALSE if read operations did not finish
> until data was available or the request timed out.[1] However, whether
> or not a zero-byte read is considered a success has nothing to do with
> whether or not a one-byte read is considered a success.
>
> Since serial ports are essentially hardware-based pipes, it makes sense
> that they behave the same as software pipes and sockets.

Pipes and sockets don't have comm timeouts, it's not at all obvious that
they should be identical. This will need tests; at the very least a test
app, if using the testbot isn't possible.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list