* sigproc.cc (cygWFMO): Don't assume that cancellable event is always

available.
* fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::waitforspace): Use cygWFMO
instead of WaitForMultipleObjects.
(fhandler_dev_dsp::Audio_in::waitfordata): Ditto.
* fhandler_fifo.cc (fhandler_fifo::wait): Ditto.
* fhandler_serial.cc (fhandler_serial::raw_read): Ditto.
(fhandler_serial::raw_write): Ditto.
* fhandler_tty.cc (fhandler_pty_slave::read): Ditto.
* select.cc (cygwin_select): Ditto for degenerate case.
This commit is contained in:
Christopher Faylor
2011-12-04 18:32:00 +00:00
parent 4510afa90d
commit 79e59d522a
7 changed files with 26 additions and 31 deletions

View File

@ -88,11 +88,12 @@ DWORD cygWFMO (DWORD n, DWORD howlong, ...)
va_start (ap, howlong);
HANDLE w4[n + 2];
va_start (ap, howlong);
unsigned i;
for (i = 0; i < n; i++)
for (unsigned i = 0; i < n; i++)
w4[i] = va_arg (ap, HANDLE);
w4[i++] = signal_arrived;
w4[i++] = pthread::get_cancel_event ();
w4[n++] = signal_arrived;
w4[n++] = pthread::get_cancel_event ();
if (!w4[n - 1])
n--;
return WaitForMultipleObjects (n, w4, FALSE, howlong);
}
#endif