]> sourceware.org Git - newlib-cygwin.git/commitdiff
revert accidentally checked in files
authorChristopher Faylor <me@cgf.cx>
Sat, 8 Jun 2013 14:42:44 +0000 (14:42 +0000)
committerChristopher Faylor <me@cgf.cx>
Sat, 8 Jun 2013 14:42:44 +0000 (14:42 +0000)
winsup/cygwin/fhandler_tty.cc
winsup/cygwin/miscfuncs.cc

index 5efbf432843f73a6dff8598ca42b03fbee111362..34c8795035734871e845096d6e031100b11af253 100644 (file)
@@ -96,7 +96,7 @@ fhandler_pty_common::__acquire_output_mutex (const char *fn, int ln,
 {
   if (strace.active ())
     strace.prntf (_STRACE_TERMIOS, fn, "(%d): pty output_mutex (%p): waiting %d ms", ln, output_mutex, ms);
-  if (0 && ms == INFINITE)
+  if (ms == INFINITE)
     ms = 100;
   DWORD res = WaitForSingleObject (output_mutex, ms);
   if (res == WAIT_OBJECT_0)
@@ -145,9 +145,6 @@ fhandler_pty_common::__release_output_mutex (const char *fn, int ln)
 void
 fhandler_pty_master::doecho (const void *str, DWORD len)
 {
-  static char buf[128 * 1024];
-  int buflen = process_slave_output (buf, sizeof (buf), false);
-  puts_readahead (buf, buflen);
   acquire_output_mutex (INFINITE);
   if (!WriteFile (to_master, str, len, &len, NULL))
     termios_printf ("Write to %p failed, %E", to_master);
index c2b405eed936f84a21d38d7afe4280692ece462f..d0748ea6c2a59c8704bd0cf9fb3aabeb9ccadae3 100644 (file)
@@ -251,8 +251,10 @@ yield ()
       /* MSDN implies that SleepEx will force scheduling of other threads.
         Unlike SwitchToThread() the documentation does not mention other
         cpus so, presumably (hah!), this + using a lower priority will
-        stall this thread temporarily and cause another to run.  */
-      SleepEx (0L, false);
+        stall this thread temporarily and cause another to run.
+        Note: Don't use 0 timeout.  This takes a lot of CPU if something
+        goes wrong. */
+      SleepEx (1L, false);
     }
   SetThreadPriority (GetCurrentThread (), prio);
 }
This page took 0.03505 seconds and 5 git commands to generate.