fhandler_serial: fix comments
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
082f2513c7
commit
8ffe12b394
@ -45,7 +45,7 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen)
|
|||||||
if (ulen == 0)
|
if (ulen == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* If VMIN > 0 in blocking mode, we have to wait for at least VMIN chars.
|
/* If MIN > 0 in blocking mode, we have to wait for at least MIN chars.
|
||||||
Otherwise we're in polling mode and there's no minimum chars. */
|
Otherwise we're in polling mode and there's no minimum chars. */
|
||||||
ssize_t minchars = is_nonblocking () ? 0 : vmin_;
|
ssize_t minchars = is_nonblocking () ? 0 : vmin_;
|
||||||
|
|
||||||
@ -85,8 +85,8 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen)
|
|||||||
and don't wait. */
|
and don't wait. */
|
||||||
if (st.cbInQue && st.cbInQue >= minchars)
|
if (st.cbInQue && st.cbInQue >= minchars)
|
||||||
bytes_to_read = MIN (st.cbInQue, bytes_to_read);
|
bytes_to_read = MIN (st.cbInQue, bytes_to_read);
|
||||||
/* Otherwise, if VMIN > 0, VTIME == 0, we have to wait until
|
/* Otherwise, if MIN > 0, TIME == 0, we have to wait until
|
||||||
VMIN bytes are available in the inbound queue. */
|
MIN bytes are available in the inbound queue. */
|
||||||
else if (minchars && !vtime_)
|
else if (minchars && !vtime_)
|
||||||
wait_for_vmin = true;
|
wait_for_vmin = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user