Changeset 610825b1 in rtems
- Timestamp:
- 12/09/13 19:46:37 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 16b1c350
- Parents:
- 849b98e8
- git-author:
- Joel Sherrill <joel.sherrill@…> (12/09/13 19:46:37)
- git-committer:
- Joel Sherrill <joel.sherrill@…> (12/10/13 01:50:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/posix/include/rtems/posix/semaphoreimpl.h
r849b98e8 r610825b1 9 9 10 10 /* 11 * COPYRIGHT (c) 1989-201 1.11 * COPYRIGHT (c) 1989-2013. 12 12 * On-Line Applications Research Corporation (OAR). 13 13 * … … 30 30 #endif 31 31 32 /* 33 * Th e followingdefines the information control block used to manage32 /** 33 * This defines the information control block used to manage 34 34 * this class of objects. 35 35 */ 36 37 36 POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information; 38 37 38 /** 39 * This defines the mapping from Score status codes to POSIX return codes. 40 */ 39 41 extern const int 40 42 _POSIX_Semaphore_Return_codes[CORE_SEMAPHORE_STATUS_LAST + 1]; 41 43 42 /* 43 * _POSIX_Semaphore_Manager_initialization 44 * 45 * DESCRIPTION: 44 /** 45 * @brief POSIX Semaphore Manager Initialization 46 46 * 47 47 * This routine performs the initialization necessary for this manager. 48 48 */ 49 50 49 void _POSIX_Semaphore_Manager_initialization(void); 51 50 52 /* 53 * _POSIX_Semaphore_Allocate 54 * 55 * DESCRIPTION: 51 /** 52 * @brief POSIX Semaphore Allocate 56 53 * 57 54 * This function allocates a semaphore control block from … … 59 56 */ 60 57 61 RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ); 58 RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) 59 { 60 return (POSIX_Semaphore_Control *) 61 _Objects_Allocate( &_POSIX_Semaphore_Information ); 62 } 62 63 63 /* 64 * _POSIX_Semaphore_Free 65 * 66 * DESCRIPTION: 64 65 /** 66 * @brief POSIX Semaphore Free 67 67 * 68 68 * This routine frees a semaphore control block to the 69 69 * inactive chain of free semaphore control blocks. 70 70 */ 71 72 71 RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( 73 72 POSIX_Semaphore_Control *the_semaphore 74 ); 73 ) 74 { 75 _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 76 } 75 77 76 /* 77 * _POSIX_Semaphore_Get 78 * 79 * DESCRIPTION: 78 /** 79 * @brief POSIX Semaphore Get 80 80 * 81 81 * This function maps semaphore IDs to semaphore control blocks. … … 87 87 * to OBJECTS_ERROR and the_semaphore is undefined. 88 88 */ 89 RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( 90 sem_t *id, 91 Objects_Locations *location 92 ) 93 { 94 return (POSIX_Semaphore_Control *) 95 _Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location ); 96 } 89 97 90 RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (91 sem_t *id,92 Objects_Locations *location93 );94 98 95 /* 96 * _POSIX_Semaphore_Create_support 97 * 98 * DESCRIPTION: 99 /** 100 * @brief POSIX Semaphore Create Support 99 101 * 100 102 * This routine supports the sem_init and sem_open routines. … … 110 112 111 113 /** 112 * @brief POSIX delete a semaphore. 113 * 114 * DESCRIPTION: 114 * @brief POSIX Semaphore Delete 115 115 * 116 116 * This routine supports the sem_close and sem_unlink routines. … … 123 123 * @brief POSIX semaphore wait support. 124 124 * 125 * DESCRIPTION:126 *127 125 * This routine supports the sem_wait, sem_trywait, and sem_timedwait 128 126 * services. … … 134 132 ); 135 133 136 /* 137 * _POSIX_Semaphore_Translate_core_semaphore_return_code 138 * 139 * DESCRIPTION: 134 /** 135 * @brief POSIX Semaphore Translate Score to POSIX Return Codes 140 136 * 141 137 * A support routine which converts core semaphore status codes into the 142 138 * appropriate POSIX status values. 143 139 */ 144 145 140 RTEMS_INLINE_ROUTINE int 146 141 _POSIX_Semaphore_Translate_core_semaphore_return_code( … … 158 153 } 159 154 160 /* 161 * _POSIX_Semaphore_Allocate155 /** 156 * @brief POSIX Semaphore Namespace Remove 162 157 */ 163 164 RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )165 {166 return (POSIX_Semaphore_Control *)167 _Objects_Allocate( &_POSIX_Semaphore_Information );168 }169 170 /*171 * _POSIX_Semaphore_Free172 */173 174 RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (175 POSIX_Semaphore_Control *the_semaphore176 )177 {178 _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );179 }180 181 /*182 * _POSIX_Semaphore_Namespace_remove183 */184 185 158 RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove ( 186 159 POSIX_Semaphore_Control *the_semaphore … … 191 164 } 192 165 193 194 195 /*196 * _POSIX_Semaphore_Get197 */198 RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (199 sem_t *id,200 Objects_Locations *location201 )202 {203 return (POSIX_Semaphore_Control *)204 _Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location );205 }206 207 166 /** 208 167 * @see _POSIX_Name_to_id().
Note: See TracChangeset
for help on using the changeset viewer.