diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 14:59:30 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 16:17:00 +0200 |
commit | 62c528e633758302f30aa714838b51613f03f9e7 (patch) | |
tree | dda69197e96e7cb301e8a71556821437439b76b1 /cpukit/rtems/src/semsetpriority.c | |
parent | rtems: _Message_queue_Get_interrupt_disable() (diff) | |
download | rtems-62c528e633758302f30aa714838b51613f03f9e7.tar.bz2 |
rtems: _Semaphore_Get_interrupt_disable()
Use _Objects_Get_local() for _Semaphore_Get_interrupt_disable() to get
rid of the location parameter. Move remote object handling to semaphore
MPCI support.
Diffstat (limited to 'cpukit/rtems/src/semsetpriority.c')
-rw-r--r-- | cpukit/rtems/src/semsetpriority.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/cpukit/rtems/src/semsetpriority.c b/cpukit/rtems/src/semsetpriority.c index 1073a561a8..3c6ad277e4 100644 --- a/cpukit/rtems/src/semsetpriority.c +++ b/cpukit/rtems/src/semsetpriority.c @@ -88,7 +88,6 @@ rtems_status_code rtems_semaphore_set_priority( ) { Semaphore_Control *the_semaphore; - Objects_Locations location; ISR_lock_Context lock_context; if ( new_priority != RTEMS_CURRENT_PRIORITY && @@ -106,25 +105,24 @@ rtems_status_code rtems_semaphore_set_priority( the_semaphore = _Semaphore_Get_interrupt_disable( semaphore_id, - &location, &lock_context ); - switch ( location ) { - case OBJECTS_LOCAL: - return _Semaphore_Set_priority( - the_semaphore, - scheduler_id, - new_priority, - old_priority, - &lock_context - ); + + if ( the_semaphore == NULL ) { #if defined(RTEMS_MULTIPROCESSING) - case OBJECTS_REMOTE: + if ( _Semaphore_MP_Is_remote( semaphore_id ) ) { return RTEMS_ILLEGAL_ON_REMOTE_OBJECT; + } #endif - case OBJECTS_ERROR: - break; + + return RTEMS_INVALID_ID; } - return RTEMS_INVALID_ID; + return _Semaphore_Set_priority( + the_semaphore, + scheduler_id, + new_priority, + old_priority, + &lock_context + ); } |