mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-01 03:50:28 +08:00
Cygwin: serial: select: fix previous revamp patch
- We need a verify function. - The event object referenced in WaitCommEvent must not be a local var, move it into fhandler_serial.
This commit is contained in:
parent
7c4a4a8e26
commit
03416f94e7
@ -1691,6 +1691,7 @@ class fhandler_serial: public fhandler_base
|
|||||||
pid_t pgrp_;
|
pid_t pgrp_;
|
||||||
int rts; /* for Windows 9x purposes only */
|
int rts; /* for Windows 9x purposes only */
|
||||||
int dtr; /* for Windows 9x purposes only */
|
int dtr; /* for Windows 9x purposes only */
|
||||||
|
DWORD event; /* for select */
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OVERLAPPED io_status;
|
OVERLAPPED io_status;
|
||||||
|
@ -1493,14 +1493,18 @@ serial_read_cleanup (select_record *s, select_stuff *stuff)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
verify_serial (select_record *me, fd_set *rfds, fd_set *wfds, fd_set *efds)
|
||||||
|
{
|
||||||
|
return peek_serial (me, true);
|
||||||
|
}
|
||||||
|
|
||||||
select_record *
|
select_record *
|
||||||
fhandler_serial::select_read (select_stuff *ss)
|
fhandler_serial::select_read (select_stuff *ss)
|
||||||
{
|
{
|
||||||
DWORD event;
|
|
||||||
select_record *s = ss->start.next;
|
select_record *s = ss->start.next;
|
||||||
|
|
||||||
s->startup = no_startup;
|
s->startup = no_startup;
|
||||||
s->verify = verify_ok;
|
s->verify = verify_serial;
|
||||||
s->cleanup = serial_read_cleanup;
|
s->cleanup = serial_read_cleanup;
|
||||||
s->peek = peek_serial;
|
s->peek = peek_serial;
|
||||||
s->read_selected = true;
|
s->read_selected = true;
|
||||||
@ -1521,7 +1525,7 @@ fhandler_serial::select_write (select_stuff *ss)
|
|||||||
select_record *s = ss->start.next;
|
select_record *s = ss->start.next;
|
||||||
|
|
||||||
s->startup = no_startup;
|
s->startup = no_startup;
|
||||||
s->verify = verify_ok;
|
s->verify = verify_serial;
|
||||||
s->peek = peek_serial;
|
s->peek = peek_serial;
|
||||||
s->write_selected = true;
|
s->write_selected = true;
|
||||||
s->write_ready = true;
|
s->write_ready = true;
|
||||||
@ -1534,7 +1538,7 @@ fhandler_serial::select_except (select_stuff *ss)
|
|||||||
select_record *s = ss->start.next;
|
select_record *s = ss->start.next;
|
||||||
|
|
||||||
s->startup = no_startup;
|
s->startup = no_startup;
|
||||||
s->verify = verify_ok;
|
s->verify = verify_serial;
|
||||||
s->peek = peek_serial;
|
s->peek = peek_serial;
|
||||||
s->except_selected = false; // Can't do this
|
s->except_selected = false; // Can't do this
|
||||||
s->except_ready = false;
|
s->except_ready = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user