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>2000-04-03 22:15:01 +0400
committerChristopher Faylor <me@cgf.cx>2000-04-03 22:15:01 +0400
commitaefbf3885d6484e411cf11ecccb3dcb7b29d75f7 (patch)
treec7a4c8d3a641d5352883a7718b9bbd608f326b5b /winsup/cygwin/select.cc
parent476839eb03747d00f6e9397357182f8cf35865b1 (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r--winsup/cygwin/select.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index b87adc123..de86ea32c 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -154,10 +154,10 @@ cygwin_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
else
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. */
- if (sel.total == 0)
+ if (sel.start.next == NULL)
{
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;
start.next = s;
- total++;
return 1;
}
@@ -247,7 +246,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
DWORD ms)
{
int wait_ret;
- HANDLE w4[total + 1];
+ HANDLE w4[MAXIMUM_WAIT_OBJECTS];
select_record *s = &start;
int m = 0;