* dtable.cc (dtable::select_write): Add missing argument to debug_printf.

* fhandler.cc (fhandler_base_overlapped::setup_overlapped): Explicitly set
io_pending to false.
(fhandler_base_overlapped::has_ongoing_io): Call GetOverlappedResult to force
completion of I/O.
(fhandler_base_overlapped::wait_overlapped): Rewrite to correctly deal with
nonblocking reads and to make more race proof.
(fhandler_base_overlapped::raw_write): Deal with new enum values.
(fhandler_base_overlapped::raw_read): Ditto.  Don't deal with ongoing I/O here
since it makes no sense in the read context.
* fhandler.h (enum wait_return): Add overlapped_unknown,
overlapped_nonblocking_no_data.
* pipe.cc (pipe): Add debugging output.
This commit is contained in:
Christopher Faylor
2011-05-31 00:26:37 +00:00
parent de3c57f06e
commit 106e3acf59
5 changed files with 92 additions and 77 deletions

View File

@ -578,8 +578,10 @@ class fhandler_base_overlapped: public fhandler_base
protected:
enum wait_return
{
overlapped_success = 0,
overlapped_unknown = 0,
overlapped_success,
overlapped_signal,
overlapped_nonblocking_no_data,
overlapped_error
};
bool io_pending;