mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 20:39:33 +08:00
* select.cc (cygwin_select): Remove select_timeout test.
(select_stuff::wait): Return select_set_zero on timeout. (thread_socket): Report timeout when debugging.
This commit is contained in:
parent
3791ab4cd5
commit
abf1b60039
@ -1,3 +1,9 @@
|
|||||||
|
2012-06-09 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||||
|
|
||||||
|
* select.cc (cygwin_select): Remove select_timeout test.
|
||||||
|
(select_stuff::wait): Return select_set_zero on timeout.
|
||||||
|
(thread_socket): Report timeout when debugging.
|
||||||
|
|
||||||
2012-06-05 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
2012-06-05 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
||||||
|
|
||||||
* include/elf.h: Update from FreeBSD.
|
* include/elf.h: Update from FreeBSD.
|
||||||
|
@ -168,9 +168,7 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||||||
else
|
else
|
||||||
res = sel.wait (r, w, e, ms); /* wait for an fd to become
|
res = sel.wait (r, w, e, ms); /* wait for an fd to become
|
||||||
become active or time out */
|
become active or time out */
|
||||||
if (res == select_stuff::select_timeout)
|
if (res >= 0)
|
||||||
res = 0; /* No fd's were active. */
|
|
||||||
else if (res >= 0)
|
|
||||||
{
|
{
|
||||||
copyfd_set (readfds, r, maxfds);
|
copyfd_set (readfds, r, maxfds);
|
||||||
copyfd_set (writefds, w, maxfds);
|
copyfd_set (writefds, w, maxfds);
|
||||||
@ -383,7 +381,7 @@ next_while:;
|
|||||||
break;
|
break;
|
||||||
case WAIT_TIMEOUT:
|
case WAIT_TIMEOUT:
|
||||||
select_printf ("timed out");
|
select_printf ("timed out");
|
||||||
res = select_timeout;
|
res = select_set_zero;
|
||||||
break;
|
break;
|
||||||
case WAIT_OBJECT_0 + 1:
|
case WAIT_OBJECT_0 + 1:
|
||||||
if (startfds > 1)
|
if (startfds > 1)
|
||||||
@ -1305,7 +1303,7 @@ thread_socket (void *arg)
|
|||||||
/ MAXIMUM_WAIT_OBJECTS));
|
/ MAXIMUM_WAIT_OBJECTS));
|
||||||
bool event = false;
|
bool event = false;
|
||||||
|
|
||||||
select_printf ("stuff_start %p", si->start);
|
select_printf ("stuff_start %p, timeout %u", si->start, timeout);
|
||||||
while (!event)
|
while (!event)
|
||||||
{
|
{
|
||||||
for (select_record *s = si->start; (s = s->next); )
|
for (select_record *s = si->start; (s = s->next); )
|
||||||
|
@ -71,7 +71,6 @@ class select_stuff
|
|||||||
public:
|
public:
|
||||||
enum wait_states
|
enum wait_states
|
||||||
{
|
{
|
||||||
select_timeout = -4,
|
|
||||||
select_signalled = -3,
|
select_signalled = -3,
|
||||||
select_loop = -2,
|
select_loop = -2,
|
||||||
select_error = -1,
|
select_error = -1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user