Conditionally compile pthread priority call;
authorsrinivas%netscape.com
Wed, 18 Nov 1998 22:58:55 +0000
changeset 320 60ee1d78948bd09cbf108d3da1215b97d86349f3
parent 319 3673afba8e3e0bf129178731e938e7063f1b46dd
child 321 6efb36669dfb3114d170e4047ad91aeb49a11b7d
push idunknown
push userunknown
push dateunknown
Conditionally compile pthread priority call; checkin for Jeremy Lea <reg@shale.csir.co.za>.
pr/src/pthreads/ptthread.c
--- a/pr/src/pthreads/ptthread.c
+++ b/pr/src/pthreads/ptthread.c
@@ -353,18 +353,20 @@ static PRThread* _PR_CreateThread(
 #if !defined(_PR_DCETHREADS)
         if (EPERM == rv)
         {
             /* Remember that we don't have thread scheduling privilege. */
             pt_schedpriv = EPERM;
             PR_LOG(_pr_thread_lm, PR_LOG_MIN,
                 ("_PR_CreateThread: no thread scheduling privilege"));
             /* Try creating the thread again without setting priority. */
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
             rv = pthread_attr_setinheritsched(&tattr, PTHREAD_INHERIT_SCHED);
             PR_ASSERT(0 == rv);
+#endif
             rv = PTHREAD_CREATE(&id, tattr, _pt_root, thred);
         }
 #endif
 
         if (0 != rv)
         {
 #if defined(_PR_DCETHREADS)
             PRIntn oserr = errno;