diff options
author | Christopher Faylor <me@cgf.cx> | 2012-06-10 05:57:53 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-06-10 05:57:53 +0400 |
commit | abf1b600393f8abf22aeb5e684a3cdecfbfc9c24 (patch) | |
tree | 160beca9671d2035fd9a939b00f9df56c2022ac7 /winsup/cygwin/select.cc | |
parent | 3791ab4cd597d6866733164a3db2c5612c0e2a40 (diff) |
* select.cc (cygwin_select): Remove select_timeout test.
(select_stuff::wait): Return select_set_zero on timeout.
(thread_socket): Report timeout when debugging.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r-- | winsup/cygwin/select.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index b9f79e8b5..2d00e7c96 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -168,9 +168,7 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, else res = sel.wait (r, w, e, ms); /* wait for an fd to become become active or time out */ - if (res == select_stuff::select_timeout) - res = 0; /* No fd's were active. */ - else if (res >= 0) + if (res >= 0) { copyfd_set (readfds, r, maxfds); copyfd_set (writefds, w, maxfds); @@ -383,7 +381,7 @@ next_while:; break; case WAIT_TIMEOUT: select_printf ("timed out"); - res = select_timeout; + res = select_set_zero; break; case WAIT_OBJECT_0 + 1: if (startfds > 1) @@ -1305,7 +1303,7 @@ thread_socket (void *arg) / MAXIMUM_WAIT_OBJECTS)); bool event = false; - select_printf ("stuff_start %p", si->start); + select_printf ("stuff_start %p, timeout %u", si->start, timeout); while (!event) { for (select_record *s = si->start; (s = s->next); ) |