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>2012-06-03 06:59:20 +0400
committerChristopher Faylor <me@cgf.cx>2012-06-03 06:59:20 +0400
commit45b61a88becdc9477826f6576b97e75b8ee49f37 (patch)
tree5e200dcbb1f35953d8ba1391de2b7086f14eeaec /winsup/cygwin/select.h
parentfaab45455a469db4ca5c4d230e7dd97dfa56382c (diff)
* DevNotes: Add entry cgf-000010.
* select.cc (set_handle_or_return_if_not_open): Remove unneeded final backslash from definition. (cygwin_select): Reorganize to incorporate outer retry loop. Move remaining time recalculation here for retry case. Use select_stuff::wait_states for loop control. (select_stuff::cleanup): Avoid unneeded initialization. (select_stuff::wait): Modify definition to return select_stuff::wait_states. Eliminate is_cancelable. Don't element 1 of an array if it is a cancel handle. Remove loop. Rely on being called from enclosing loop in cygwin_select. Remove time recalculation when restarting. Try harder to always return from the bottom. * select.h (select_stuff::wait_state): New enum. (select_stuff::wait): Modify declaration to return select_stuff::wait_states.
Diffstat (limited to 'winsup/cygwin/select.h')
-rw-r--r--winsup/cygwin/select.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h
index 57cd59673..9e09582c1 100644
--- a/winsup/cygwin/select.h
+++ b/winsup/cygwin/select.h
@@ -69,6 +69,16 @@ struct select_mailslot_info: public select_info
class select_stuff
{
public:
+ enum wait_states
+ {
+ select_timeout = -4,
+ select_signalled = -3,
+ select_loop = -2,
+ select_error = -1,
+ select_ok = 0,
+ select_set_zero = 1
+ };
+
~select_stuff ();
bool return_on_signal;
bool always_ready, windows_used;
@@ -82,9 +92,10 @@ public:
bool test_and_set (int i, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds);
int poll (fd_set *readfds, fd_set *writefds, fd_set *exceptfds);
- int wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, DWORD ms);
+ wait_states wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, DWORD ms);
void cleanup ();
void destroy ();
+
select_stuff (): return_on_signal (false), always_ready (false),
windows_used (false), start (0),
device_specific_pipe (0),