Throughout change all calls of low_priority_sleep (0) to yield ().
* miscfuncs.cc (yield): Rename from low_priority_sleep. Remove all of the logic which called Sleep() and just use SwitchToThread. * miscfuncs.h (yield): Rename from low_priority_sleep. (SLEEP_0_STAY_LOW): Delete unused define. * shared.cc (memory_init): Move heap_init() call directly after shared memory initialization to more closely mimic long-standing program flow. * tty.cc (tty_list::terminate): Replace call to low_priority_sleep with Sleep.
This commit is contained in:
@ -440,7 +440,7 @@ try_to_debug (bool waitloop)
|
||||
return dbg;
|
||||
SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_IDLE);
|
||||
while (!being_debugged ())
|
||||
low_priority_sleep (0);
|
||||
yield ();
|
||||
Sleep (2000);
|
||||
}
|
||||
|
||||
@ -901,7 +901,7 @@ setup_handler (int sig, void *handler, struct sigaction& siga, _cygtls *tls)
|
||||
break;
|
||||
|
||||
sigproc_printf ("couldn't interrupt. trying again.");
|
||||
low_priority_sleep (0);
|
||||
yield ();
|
||||
}
|
||||
|
||||
out:
|
||||
|
Reference in New Issue
Block a user