summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-01-23 02:32:28 +0000
committerwtc%netscape.com <devnull@localhost>2002-01-23 02:32:28 +0000
commitf908b0a8760867a3a6beb4b175340a0fd56f7804 (patch)
tree472debda03eb80304ec2c15d871f88e689bf8d5e
parent9dcb2398a9ac0aa43ad204afb1f4ca2b077ff688 (diff)
downloadnspr-hg-f908b0a8760867a3a6beb4b175340a0fd56f7804.tar.gz
Bugzilla bug 119935: we need to set the priority of the new thread only if
the priority is not PR_PRIORITY_NORMAL. (Windows creates new threads with the normal priority.) Thanks to Michael Kaply <mkaply@us.ibm.com> for reporting this bug. Modified files: ntthread.c w95thred.c
-rw-r--r--pr/src/md/windows/ntthread.c7
-rw-r--r--pr/src/md/windows/w95thred.c8
2 files changed, 14 insertions, 1 deletions
diff --git a/pr/src/md/windows/ntthread.c b/pr/src/md/windows/ntthread.c
index 9c3e2baf..1c3fb531 100644
--- a/pr/src/md/windows/ntthread.c
+++ b/pr/src/md/windows/ntthread.c
@@ -238,6 +238,13 @@ _PR_MD_CREATE_THREAD(PRThread *thread,
}
thread->md.id = thread->id;
+ /*
+ * On windows, a thread is created with a thread priority of
+ * THREAD_PRIORITY_NORMAL.
+ */
+ if (priority != PR_PRIORITY_NORMAL) {
+ _PR_MD_SET_PRIORITY(&(thread->md), priority);
+ }
/* Activate the thread */
if ( ResumeThread( thread->md.handle ) != -1)
diff --git a/pr/src/md/windows/w95thred.c b/pr/src/md/windows/w95thred.c
index a70f1620..f8a70043 100644
--- a/pr/src/md/windows/w95thred.c
+++ b/pr/src/md/windows/w95thred.c
@@ -131,7 +131,13 @@ _PR_MD_CREATE_THREAD(PRThread *thread,
}
thread->md.id = thread->id;
- _PR_MD_SET_PRIORITY(&(thread->md), priority);
+ /*
+ * On windows, a thread is created with a thread priority of
+ * THREAD_PRIORITY_NORMAL.
+ */
+ if (priority != PR_PRIORITY_NORMAL) {
+ _PR_MD_SET_PRIORITY(&(thread->md), priority);
+ }
/* Activate the thread */
if ( ResumeThread( thread->md.handle ) != -1)