* miscfuncs.cc (low_priority_sleep): Sleep at same priority as main thread.

* sigproc.cc (wait_sig): Keep looping if there are more signals to consider and
we are flushing signals.
(sig_send): Put nonsync signals in the correct bucket.
This commit is contained in:
Christopher Faylor
2003-08-21 03:18:46 +00:00
parent d41ac477ee
commit d688945c44
3 changed files with 41 additions and 31 deletions

View File

@@ -306,12 +306,13 @@ low_priority_sleep (DWORD secs)
staylow = true;
}
if (curr_prio != THREAD_PRIORITY_NORMAL)
int main_prio = GetThreadPriority (hMainThread);
if (curr_prio != main_prio)
/* Force any threads in normal priority to be scheduled */
SetThreadPriority (thisthread, THREAD_PRIORITY_NORMAL);
SetThreadPriority (thisthread, main_prio);
Sleep (secs);
if (!staylow || curr_prio == THREAD_PRIORITY_NORMAL)
if (!staylow || curr_prio == main_prio)
SetThreadPriority (thisthread, curr_prio);
return curr_prio;
}