mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 16:26:12 +08:00
* fhandler.h (select_stuff): Eliminate use of 'total'.
* select.cc (cygwin_select): Ditto. (select_stuff::wait): Use maximum size for w4 rather than calculating what will fit.
This commit is contained in:
parent
476839eb03
commit
aefbf3885d
@ -1,3 +1,10 @@
|
|||||||
|
Mon Apr 3 14:10:44 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* fhandler.h (select_stuff): Eliminate use of 'total'.
|
||||||
|
* select.cc (cygwin_select): Ditto.
|
||||||
|
(select_stuff::wait): Use maximum size for w4 rather than calculating
|
||||||
|
what will fit.
|
||||||
|
|
||||||
Mon Apr 03 13:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
Mon Apr 03 13:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* grp.cc (parse_grp): Save empty array instead of
|
* grp.cc (parse_grp): Save empty array instead of
|
||||||
|
@ -793,13 +793,11 @@ class select_stuff
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~select_stuff ();
|
~select_stuff ();
|
||||||
select_stuff (): always_ready (0), windows_used (0),
|
select_stuff (): always_ready (0), windows_used (0), start (0)
|
||||||
total (0), start (0)
|
|
||||||
{
|
{
|
||||||
memset (device_specific, 0, sizeof (device_specific));
|
memset (device_specific, 0, sizeof (device_specific));
|
||||||
}
|
}
|
||||||
BOOL always_ready, windows_used;
|
BOOL always_ready, windows_used;
|
||||||
int total;
|
|
||||||
select_record start;
|
select_record start;
|
||||||
void *device_specific[FH_NDEV];
|
void *device_specific[FH_NDEV];
|
||||||
|
|
||||||
|
@ -154,10 +154,10 @@ cygwin_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||||||
else
|
else
|
||||||
select_printf ("to NULL, ms %x", ms);
|
select_printf ("to NULL, ms %x", ms);
|
||||||
|
|
||||||
select_printf ("sel.total %d, sel.always_ready %d", sel.total, sel.always_ready);
|
select_printf ("sel.always_ready %d", sel.always_ready);
|
||||||
|
|
||||||
/* Degenerate case. No fds to wait for. Just wait. */
|
/* Degenerate case. No fds to wait for. Just wait. */
|
||||||
if (sel.total == 0)
|
if (sel.start.next == NULL)
|
||||||
{
|
{
|
||||||
if (WaitForSingleObject (signal_arrived, ms) == WAIT_OBJECT_0)
|
if (WaitForSingleObject (signal_arrived, ms) == WAIT_OBJECT_0)
|
||||||
{
|
{
|
||||||
@ -225,7 +225,6 @@ select_stuff::test_and_set (int i, fd_set *readfds, fd_set *writefds,
|
|||||||
|
|
||||||
s->next = start.next;
|
s->next = start.next;
|
||||||
start.next = s;
|
start.next = s;
|
||||||
total++;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,7 +246,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||||||
DWORD ms)
|
DWORD ms)
|
||||||
{
|
{
|
||||||
int wait_ret;
|
int wait_ret;
|
||||||
HANDLE w4[total + 1];
|
HANDLE w4[MAXIMUM_WAIT_OBJECTS];
|
||||||
select_record *s = &start;
|
select_record *s = &start;
|
||||||
int m = 0;
|
int m = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user