diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-08-14 23:11:18 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-08-14 23:11:18 +0000 |
commit | f17efcb43e500d4af62b71bd6f286af831069b5a (patch) | |
tree | bf062a11f158b5bc8e33e42cc85e625751bacf94 /nptl/pthread_mutexattr_getprioceiling.c | |
parent | 107b8a922a9f72bae8d066549c675062bee0897f (diff) | |
download | glibc-f17efcb43e500d4af62b71bd6f286af831069b5a.tar.gz glibc-f17efcb43e500d4af62b71bd6f286af831069b5a.tar.xz glibc-f17efcb43e500d4af62b71bd6f286af831069b5a.zip |
* sysdeps/powerpc/powerpc32/dl-trampoline.S (_dl_runtime_resolve):
Don't clobber caller's LRSAVE. (_dl_prof_resolve): Likewise.
Diffstat (limited to 'nptl/pthread_mutexattr_getprioceiling.c')
-rw-r--r-- | nptl/pthread_mutexattr_getprioceiling.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/nptl/pthread_mutexattr_getprioceiling.c b/nptl/pthread_mutexattr_getprioceiling.c index da1beabf46..792e9a43d6 100644 --- a/nptl/pthread_mutexattr_getprioceiling.c +++ b/nptl/pthread_mutexattr_getprioceiling.c @@ -27,11 +27,22 @@ pthread_mutexattr_getprioceiling (attr, prioceiling) int *prioceiling; { const struct pthread_mutexattr *iattr; + int ceiling; iattr = (const struct pthread_mutexattr *) attr; - *prioceiling = ((iattr->mutexkind & PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) - >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT); + ceiling = ((iattr->mutexkind & PTHREAD_MUTEXATTR_PRIO_CEILING_MASK) + >> PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT); + + if (! ceiling) + { + if (__sched_fifo_min_prio == -1) + __init_sched_fifo_prio (); + if (ceiling < __sched_fifo_min_prio) + ceiling = __sched_fifo_min_prio; + } + + *prioceiling = ceiling; return 0; } |