summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/mutexsetprioceiling.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2015-05-21 18:08:32 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2015-05-21 18:08:32 -0500
commit24acc6d0c092c244881dd6ffadc3782a8136fccc (patch)
tree864b4985a7a431bd3520e9d815927eee5315c2df /cpukit/posix/src/mutexsetprioceiling.c
parentMerge branch 'master' of ssh://dispatch.rtems.org/data/git/rtems (diff)
parentdoc: Add new documentation section for Epiphany architecture (diff)
downloadrtems-24acc6d0c092c244881dd6ffadc3782a8136fccc.tar.bz2
Merge branch 'master' of ssh://dispatch.rtems.org/data/git/rtems
Diffstat (limited to 'cpukit/posix/src/mutexsetprioceiling.c')
-rw-r--r--cpukit/posix/src/mutexsetprioceiling.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/cpukit/posix/src/mutexsetprioceiling.c b/cpukit/posix/src/mutexsetprioceiling.c
index f0fb8f5ee6..32d92107cc 100644
--- a/cpukit/posix/src/mutexsetprioceiling.c
+++ b/cpukit/posix/src/mutexsetprioceiling.c
@@ -41,6 +41,7 @@ int pthread_mutex_setprioceiling(
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
+ ISR_lock_Context lock_context;
if ( !old_ceiling )
return EINVAL;
@@ -64,7 +65,11 @@ int pthread_mutex_setprioceiling(
* NOTE: This makes it easier to get 100% binary coverage since the
* bad Id case is handled by the switch.
*/
- the_mutex = _POSIX_Mutex_Get( mutex, &location );
+ the_mutex = _POSIX_Mutex_Get_interrupt_disable(
+ mutex,
+ &location,
+ &lock_context
+ );
switch ( location ) {
case OBJECTS_LOCAL:
@@ -78,9 +83,9 @@ int pthread_mutex_setprioceiling(
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
- NULL
+ NULL,
+ &lock_context
);
- _Objects_Put( &the_mutex->Object );
return 0;