* 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.
This commit is contained in:
Christopher Faylor
2012-06-03 02:59:20 +00:00
parent faab45455a
commit 45b61a88be
5 changed files with 219 additions and 152 deletions

View File

@ -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),