pthread_mutex_setprioceiling: fixed bug where returned priority was

not converted from core priority to posix priority.
This commit is contained in:
Joel Sherrill
1996-09-05 20:41:10 +00:00
parent 7e230f1032
commit 297be5c8f1
2 changed files with 6 additions and 2 deletions

View File

@@ -635,7 +635,9 @@ int pthread_mutex_setprioceiling(
/* XXX It feels questionable to set the ceiling on a remote mutex. */
return EINVAL;
case OBJECTS_LOCAL:
*old_ceiling = the_mutex->Mutex.Attributes.priority_ceiling;
*old_ceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
_CORE_mutex_Surrender(
&the_mutex->Mutex,

View File

@@ -635,7 +635,9 @@ int pthread_mutex_setprioceiling(
/* XXX It feels questionable to set the ceiling on a remote mutex. */
return EINVAL;
case OBJECTS_LOCAL:
*old_ceiling = the_mutex->Mutex.Attributes.priority_ceiling;
*old_ceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
_CORE_mutex_Surrender(
&the_mutex->Mutex,