Fixed unsigned compare against zero. Changed win32 priority to

maximum.
This commit is contained in:
crs 2003-05-21 21:22:14 +00:00
parent d577d457e3
commit 3bd3e7a17c
3 changed files with 10 additions and 7 deletions

View File

@ -388,14 +388,17 @@ CArchMultithreadWindows::setPriorityOfThread(CArchThread thread, int n)
assert(thread != NULL); assert(thread != NULL);
size_t index = s_pBase - n; size_t index;
if (index < 0) { if (s_pBase < n) {
// lowest priority // lowest priority
index = 0; index = 0;
} }
else if (index > s_pMax) { else {
// highest priority index = s_pBase - n;
index = s_pMax; if (index > s_pMax) {
// highest priority
index = s_pMax;
}
} }
SetPriorityClass(thread->m_thread, s_pClass[index].m_class); SetPriorityClass(thread->m_thread, s_pClass[index].m_class);
SetThreadPriority(thread->m_thread, s_pClass[index].m_level); SetThreadPriority(thread->m_thread, s_pClass[index].m_level);

View File

@ -40,7 +40,7 @@ void
CPrimaryScreen::mainLoop() CPrimaryScreen::mainLoop()
{ {
// change our priority // change our priority
CThread::getCurrentThread().setPriority(-13); CThread::getCurrentThread().setPriority(-14);
// run event loop // run event loop
try { try {

View File

@ -40,7 +40,7 @@ void
CSecondaryScreen::mainLoop() CSecondaryScreen::mainLoop()
{ {
// change our priority // change our priority
CThread::getCurrentThread().setPriority(-13); CThread::getCurrentThread().setPriority(-14);
// run event loop // run event loop
try { try {