From c0a02a4b42accbc574e84654cd845f8971d6a298 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 13 Nov 2002 19:36:12 +0000 Subject: * miscfuncs.cc (low_priority_sleep): New function. Use throughout where code is supposed to be giving up time slice. * fhandler_console.cc (fhandler_console::read): Switch button 2/3 output escape sequences to be consistent with xterm. --- winsup/cygwin/pinfo.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'winsup/cygwin/pinfo.cc') diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index d4764bced..6feea6444 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -212,7 +212,7 @@ pinfo::init (pid_t n, DWORD flag, HANDLE in_h) this way at some point. */ if (i < 9 && !created && createit && (procinfo->process_state & PID_EXITED)) { - Sleep (5); + low_priority_sleep (5); release (); continue; } @@ -368,12 +368,7 @@ _pinfo::commune_send (DWORD code) if (myself->hello_pid <= 0) break; else - { - DWORD prio = GetThreadPriority (GetCurrentThread ()); - SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_IDLE); - Sleep (0); - SetThreadPriority (GetCurrentThread (), prio); - } + low_priority_sleep (0); CloseHandle (tome); tome = NULL; -- cgit v1.2.3