diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-10 08:48:54 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-22 14:36:40 +0200 |
commit | 77ff5599e0d8e6d91190a379be21a332f83252b0 (patch) | |
tree | 339e28b236beb9e606322cb801d7340e2e44f8bf /cpukit/posix/src/mutexgetprioceiling.c | |
parent | b8f76fa28e1e7258fbf9b15894fbf1be5b1fbe15 (diff) |
score: Introduce map priority scheduler operation
Introduce map/unmap priority scheduler operations to map thread priority
values from/to the user domain to/from the scheduler domain. Use the
map priority operation to validate the thread priority. The EDF
schedulers use this new operation to distinguish between normal
priorities and priorities obtain through a job release.
Update #2173.
Update #2556.
Diffstat (limited to 'cpukit/posix/src/mutexgetprioceiling.c')
-rw-r--r-- | cpukit/posix/src/mutexgetprioceiling.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cpukit/posix/src/mutexgetprioceiling.c b/cpukit/posix/src/mutexgetprioceiling.c index eda02cba83..dfff98f9b7 100644 --- a/cpukit/posix/src/mutexgetprioceiling.c +++ b/cpukit/posix/src/mutexgetprioceiling.c @@ -45,10 +45,14 @@ int pthread_mutex_getprioceiling( _POSIX_Mutex_Acquire_critical( the_mutex, &queue_context ); - *prioceiling = _POSIX_Priority_From_core( - &_Scheduler_Table[ 0 ], - the_mutex->Mutex.priority_ceiling - ); + if ( the_mutex->protocol == POSIX_MUTEX_PRIORITY_CEILING ) { + *prioceiling = _POSIX_Priority_From_core( + _CORE_ceiling_mutex_Get_scheduler( &the_mutex->Mutex ), + _CORE_ceiling_mutex_Get_priority( &the_mutex->Mutex ) + ); + } else { + *prioceiling = 0; + } _POSIX_Mutex_Release( the_mutex, &queue_context ); |