Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-12-11 03:24:46 +0300
committerChristopher Faylor <me@cgf.cx>2001-12-11 03:24:46 +0300
commit40139114ea210664fec067383b12b885f0a60181 (patch)
treee70d9eb37fa4476bc84cee19260522363404ecfc /winsup/cygwin/select.cc
parentcf77faefc8c0a468fb70947ffcd78d0d5b890d6f (diff)
* fhandler.h (fhandler_serial::ev): New class member.
* fhandler_serial.cc (fhandler_serial::raw_read): Use class member for event status. * select.cc (peek_serial): Ditto.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r--winsup/cygwin/select.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index c54e72723..56d818d56 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -865,7 +865,6 @@ struct serialinf
static int
peek_serial (select_record *s, bool)
{
- DWORD ev;
COMSTAT st;
fhandler_serial *fh = (fhandler_serial *)s->fh;
@@ -890,19 +889,18 @@ peek_serial (select_record *s, bool)
if (!fh->overlapped_armed)
{
- DWORD ev;
COMSTAT st;
ResetEvent (fh->io_status.hEvent);
- if (!ClearCommError (h, &ev, &st))
+ if (!ClearCommError (h, &fh->ev, &st))
{
debug_printf ("ClearCommError");
goto err;
}
else if (st.cbInQue)
return s->read_ready = true;
- else if (WaitCommEvent (h, &ev, &fh->io_status))
+ else if (WaitCommEvent (h, &fh->ev, &fh->io_status))
return s->read_ready = true;
else if (GetLastError () == ERROR_IO_PENDING)
fh->overlapped_armed = 1;
@@ -923,7 +921,7 @@ peek_serial (select_record *s, bool)
switch (WaitForMultipleObjects (2, w4, FALSE, to))
{
case WAIT_OBJECT_0:
- if (!ClearCommError (h, &ev, &st))
+ if (!ClearCommError (h, &fh->ev, &st))
{
debug_printf ("ClearCommError");
goto err;