diff options
author | Christopher Faylor <me@cgf.cx> | 2003-08-21 03:18:46 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-08-21 03:18:46 +0000 |
commit | d688945c445857ac67704822d07522b91957be07 (patch) | |
tree | 6f13cc259c9709302014a07656063689b7c9c66d /winsup/cygwin/miscfuncs.cc | |
parent | d41ac477eeca78c49ed31959882e8d705e93d4a1 (diff) | |
download | cygnal-d688945c445857ac67704822d07522b91957be07.tar.gz cygnal-d688945c445857ac67704822d07522b91957be07.tar.bz2 cygnal-d688945c445857ac67704822d07522b91957be07.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/miscfuncs.cc')
-rw-r--r-- | winsup/cygwin/miscfuncs.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 6956d38be..fea1b1249 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -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; } |