projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New module 'integer_length_l'.
[gnulib.git]
/
lib
/
poll.c
diff --git
a/lib/poll.c
b/lib/poll.c
index
8ce68c0
..
b012ba0
100644
(file)
--- a/
lib/poll.c
+++ b/
lib/poll.c
@@
-43,6
+43,7
@@
# include <io.h>
# include <stdio.h>
# include <conio.h>
# include <io.h>
# include <stdio.h>
# include <conio.h>
+# include "msvc-nothrow.h"
#else
# include <sys/time.h>
# include <sys/socket.h>
#else
# include <sys/time.h>
# include <sys/socket.h>
@@
-452,6
+453,7
@@
poll (struct pollfd *pfd, nfds_t nfd, int timeout)
if (!hEvent)
hEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
if (!hEvent)
hEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
+restart:
handle_array[0] = hEvent;
nhandles = 1;
FD_ZERO (&rfds);
handle_array[0] = hEvent;
nhandles = 1;
FD_ZERO (&rfds);
@@
-592,6
+594,12
@@
poll (struct pollfd *pfd, nfds_t nfd, int timeout)
rc++;
}
rc++;
}
+ if (!rc && timeout == INFTIM)
+ {
+ SwitchToThread();
+ goto restart;
+ }
+
return rc;
#endif
}
return rc;
#endif
}