From f17efcb43e500d4af62b71bd6f286af831069b5a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Aug 2006 23:11:18 +0000 Subject: * sysdeps/powerpc/powerpc32/dl-trampoline.S (_dl_runtime_resolve): Don't clobber caller's LRSAVE. (_dl_prof_resolve): Likewise. --- nptl/pthread_setschedprio.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nptl/pthread_setschedprio.c') diff --git a/nptl/pthread_setschedprio.c b/nptl/pthread_setschedprio.c index 063f523..4a71f6c 100644 --- a/nptl/pthread_setschedprio.c +++ b/nptl/pthread_setschedprio.c @@ -47,6 +47,11 @@ pthread_setschedprio (threadid, prio) lll_lock (pd->lock); + /* If the thread should have higher priority because of some + PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */ + if (__builtin_expect (pd->tpp != NULL, 0) && pd->tpp->priomax > prio) + param.sched_priority = pd->tpp->priomax; + /* Try to set the scheduler information. */ if (__builtin_expect (sched_setparam (pd->tid, ¶m) == -1, 0)) result = errno; @@ -54,6 +59,7 @@ pthread_setschedprio (threadid, prio) { /* We succeeded changing the kernel information. Reflect this change in the thread descriptor. */ + param.sched_priority = prio; memcpy (&pd->schedparam, ¶m, sizeof (struct sched_param)); pd->flags |= ATTR_FLAG_SCHED_SET; } -- cgit v1.1