From e96ea0c3d8e3493db61ddff5d1bae2c907a878a2 Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Thu, 11 Apr 2002 18:31:09 +0000 Subject: [PATCH] Bug 135450: OS/2 only - don't set priority if it is the default. The patch is contributed by Michael Kaply . r=wtc. --- nsprpub/pr/src/md/os2/os2thred.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nsprpub/pr/src/md/os2/os2thred.c b/nsprpub/pr/src/md/os2/os2thred.c index d64ae0b9f4a3..f05be463779e 100644 --- a/nsprpub/pr/src/md/os2/os2thred.c +++ b/nsprpub/pr/src/md/os2/os2thred.c @@ -127,7 +127,15 @@ _PR_MD_CREATE_THREAD(PRThread *thread, if(thread->md.handle == -1) { return PR_FAILURE; } - _PR_MD_SET_PRIORITY(&(thread->md), priority); + + /* + * On OS/2, a thread is created with a thread priority of + * THREAD_PRIORITY_NORMAL + */ + + if (priority != PR_PRIORITY_NORMAL) { + _PR_MD_SET_PRIORITY(&(thread->md), priority); + } return PR_SUCCESS; }