* miscfuncs.cc (low_priority_sleep): Correct thinko which caused SetPriority to

be called unnecessarily.
* thread.cc (pthread::init_main_thread): Call new create_cancel_event function.
(pthread::precreate): Ditto.
(pthread::postcreate): Remove cancel_event creation.
(pthread::create_cancel_event): Define new function.
* thread.h (pthread::create_cancel_event): Declare new function.
This commit is contained in:
Christopher Faylor
2003-12-12 04:15:32 +00:00
parent 97cb9b9de4
commit c76d70d7c0
4 changed files with 34 additions and 15 deletions

View File

@ -334,7 +334,7 @@ low_priority_sleep (DWORD secs)
SetThreadPriority (thisthread, new_prio);
Sleep (secs);
if (!staylow || curr_prio == new_prio)
if (!staylow && curr_prio != new_prio)
SetThreadPriority (thisthread, curr_prio);
}