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/include | |
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 '')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/semimpl.h | 21 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/semmp.h | 24 |
2 files changed, 19 insertions, 26 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/semimpl.h b/cpukit/rtems/include/rtems/rtems/semimpl.h index b67b415750..7c26c24c27 100644 --- a/cpukit/rtems/include/rtems/rtems/semimpl.h +++ b/cpukit/rtems/include/rtems/rtems/semimpl.h @@ -134,28 +134,15 @@ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); } -/** - * @brief Maps semaphore IDs to semaphore control blocks. - * - * This function maps semaphore IDs to semaphore control blocks. - * If ID corresponds to a local semaphore, then it returns - * the_semaphore control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the semaphore ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_semaphore is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_semaphore is undefined. - */ -RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get_interrupt_disable ( +RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get_interrupt_disable( Objects_Id id, - Objects_Locations *location, ISR_lock_Context *lock_context ) { - return (Semaphore_Control *) _Objects_Get_isr_disable( - &_Semaphore_Information, + return (Semaphore_Control *) _Objects_Get_local( id, - location, - lock_context + lock_context, + &_Semaphore_Information ); } diff --git a/cpukit/rtems/include/rtems/rtems/semmp.h b/cpukit/rtems/include/rtems/rtems/semmp.h index d186aa0997..9d7669f43e 100644 --- a/cpukit/rtems/include/rtems/rtems/semmp.h +++ b/cpukit/rtems/include/rtems/rtems/semmp.h @@ -65,6 +65,11 @@ typedef struct { Objects_Id proxy_id; } Semaphore_MP_Packet; +RTEMS_INLINE_ROUTINE bool _Semaphore_MP_Is_remote( Objects_Id id ) +{ + return _Objects_MP_Is_remote( id, &_Semaphore_Information ); +} + /** * @brief Semaphore MP Send Process Packet * @@ -79,19 +84,20 @@ void _Semaphore_MP_Send_process_packet ( ); /** - * @brief Semaphore MP Send Request Packet - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. + * @brief Issues a remote rtems_semaphore_obtain() request. */ -rtems_status_code _Semaphore_MP_Send_request_packet ( - Semaphore_MP_Remote_operations operation, - Objects_Id semaphore_id, - rtems_option option_set, - rtems_interval timeout +rtems_status_code _Semaphore_MP_Obtain( + rtems_id id, + rtems_option option_set, + rtems_interval timeout ); /** + * @brief Issues a remote rtems_semaphore_release() request. + */ +rtems_status_code _Semaphore_MP_Release( rtems_id id ); + +/** * @brief Semaphore MP Process Packet * * This routine performs the actions specific to this package for |