summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/mutexsetprioceiling.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/mutexsetprioceiling.c')
-rw-r--r--cpukit/posix/src/mutexsetprioceiling.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/cpukit/posix/src/mutexsetprioceiling.c b/cpukit/posix/src/mutexsetprioceiling.c
index 9288ffd828..87d9ba46f3 100644
--- a/cpukit/posix/src/mutexsetprioceiling.c
+++ b/cpukit/posix/src/mutexsetprioceiling.c
@@ -49,17 +49,19 @@ int pthread_mutex_setprioceiling(
return EINVAL;
}
- the_mutex = _POSIX_Mutex_Get_no_protection( mutex );
- _Assert( the_mutex != NULL );
+ the_mutex = _POSIX_Mutex_Get( mutex );
- if ( the_mutex->protocol == POSIX_MUTEX_PRIORITY_CEILING ) {
+ if (
+ _POSIX_Mutex_Get_protocol( the_mutex->flags )
+ == POSIX_MUTEX_PRIORITY_CEILING
+ ) {
const Scheduler_Control *scheduler;
bool valid;
Priority_Control new_priority;
Priority_Control old_priority;
- scheduler = _CORE_ceiling_mutex_Get_scheduler( &the_mutex->Mutex );
- old_priority = _CORE_ceiling_mutex_Get_priority( &the_mutex->Mutex );
+ scheduler = _POSIX_Mutex_Get_scheduler( the_mutex );
+ old_priority = _POSIX_Mutex_Get_priority( the_mutex );
*old_ceiling = _POSIX_Priority_From_core( scheduler, old_priority );
new_priority = _POSIX_Priority_To_core( scheduler, prioceiling, &valid );
@@ -69,8 +71,8 @@ int pthread_mutex_setprioceiling(
_Thread_queue_Context_initialize( &queue_context );
_Thread_queue_Context_clear_priority_updates( &queue_context );
- _CORE_ceiling_mutex_Set_priority(
- &the_mutex->Mutex,
+ _POSIX_Mutex_Set_priority(
+ the_mutex,
new_priority,
&queue_context
);