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>2011-12-04 22:32:00 +0400
committerChristopher Faylor <me@cgf.cx>2011-12-04 22:32:00 +0400
commit79e59d522afe5692c09ab21eade08947eca3ec19 (patch)
treecd44280ba1c10616a5bb8d19ed01f2681d75045c /winsup/cygwin/fhandler_tty.cc
parent4510afa90d42eec08a2ec91f4203ed126ab998c8 (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 6b7ad80f2..1906b06b2 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -702,10 +702,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
while (len)
{
- HANDLE w4[3] = { input_available_event, signal_arrived,
- pthread::get_cancel_event () };
- DWORD cnt = w4[2] ? 3 : 2;
- switch (WaitForMultipleObjects (cnt, w4, FALSE, time_to_wait))
+ switch (cygWFMO (1, time_to_wait, input_available_event))
{
case WAIT_OBJECT_0:
break;
@@ -741,8 +738,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
}
/* Now that we know that input is available we have to grab the
input mutex. */
- w4[0] = input_mutex;
- switch (WaitForMultipleObjects (cnt, w4, FALSE, 1000))
+ switch (cygWFMO (1, 1000, input_mutex))
{
case WAIT_OBJECT_0:
case WAIT_ABANDONED_0: