* 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

@@ -540,10 +540,8 @@ fhandler_dev_dsp::Audio_out::waitforspace ()
set_errno (EAGAIN);
return false;
}
HANDLE w4[2] = { signal_arrived, pthread::get_cancel_event () };
DWORD cnt = w4[1] ? 2 : 1;
debug_printf ("100ms");
switch (WaitForMultipleObjects (cnt, w4, FALSE, 100))
switch (cygWFMO (0, 100))
{
case WAIT_OBJECT_0:
if (!_my_tls.call_signal_handler ())
@@ -920,10 +918,8 @@ fhandler_dev_dsp::Audio_in::waitfordata ()
set_errno (EAGAIN);
return false;
}
HANDLE w4[2] = { signal_arrived, pthread::get_cancel_event () };
DWORD cnt = w4[1] ? 2 : 1;
debug_printf ("100ms");
switch (WaitForMultipleObjects (cnt, w4, FALSE, 100))
switch (cygWFMO (0, 100))
{
case WAIT_OBJECT_0:
if (!_my_tls.call_signal_handler ())