Changeset 07a3aa9d in rtems
- Timestamp:
- 12/09/13 19:29:41 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 849b98e8
- Parents:
- 71f2a83d
- git-author:
- Joel Sherrill <joel.sherrill@…> (12/09/13 19:29:41)
- git-committer:
- Joel Sherrill <joel.sherrill@…> (12/10/13 01:50:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/posix/include/rtems/posix/condimpl.h
r71f2a83d r07a3aa9d 1 1 /** 2 * @file rtems/posix/cond.inl2 * @file 3 3 * 4 4 * This include file contains the static inline implementation of the private … … 7 7 8 8 /* 9 * COPYRIGHT (c) 1989-201 1.9 * COPYRIGHT (c) 1989-2013. 10 10 * On-Line Applications Research Corporation (OAR). 11 11 * … … 26 26 #endif 27 27 28 /* 28 /** 29 29 * Constant to indicate condition variable does not currently have 30 30 * a mutex assigned to it. 31 31 */ 32 33 32 #define POSIX_CONDITION_VARIABLES_NO_MUTEX 0 34 33 35 /* 34 /** 36 35 * The following defines the information control block used to manage 37 36 * this class of objects. 38 37 */ 39 40 38 POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information; 41 39 42 /* 40 /** 43 41 * The default condition variable attributes structure. 44 42 */ 45 46 43 extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes; 47 44 48 /* 49 * @brief Initialization Necessary for this Manager 50 * 51 * _POSIX_Condition_variables_Manager_initialization 52 * 53 * DESCRIPTION: 45 /** 46 * @brief POSIX Condition Variable Manager Initialization 54 47 * 55 48 * This routine performs the initialization necessary for this manager. 56 49 */ 57 58 50 void _POSIX_Condition_variables_Manager_initialization(void); 59 51 60 /* 61 * _POSIX_Condition_variables_Allocate 62 * 63 * DESCRIPTION: 52 /** 53 * @brief POSIX Condition Variable Allocate 64 54 * 65 55 * This function allocates a condition variable control block from 66 56 * the inactive chain of free condition variable control blocks. 67 57 */ 58 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control * 59 _POSIX_Condition_variables_Allocate( void ) 60 { 61 return (POSIX_Condition_variables_Control *) 62 _Objects_Allocate( &_POSIX_Condition_variables_Information ); 63 } 68 64 69 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control * 70 _POSIX_Condition_variables_Allocate( void ); 71 72 /* 73 * _POSIX_Condition_variables_Free 74 * 75 * DESCRIPTION: 65 /** 66 * @brief POSIX Condition Variable Free 76 67 * 77 68 * This routine frees a condition variable control block to the 78 69 * inactive chain of free condition variable control blocks. 79 70 */ 80 81 71 RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( 82 72 POSIX_Condition_variables_Control *the_condition_variable 83 ); 73 ) 74 { 75 _Objects_Free( 76 &_POSIX_Condition_variables_Information, 77 &the_condition_variable->Object 78 ); 79 } 84 80 85 /* 86 * _POSIX_Condition_variables_Get 87 * 88 * DESCRIPTION: 81 /** 82 * @brief POSIX Condition Variable Get 89 83 * 90 84 * This function maps condition variable IDs to condition variable control … … 96 90 * to OBJECTS_ERROR and the_condition variable is undefined. 97 91 */ 98 99 #if 0 100 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( 101 Objects_Id *id, 92 POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( 93 pthread_cond_t *cond, 102 94 Objects_Locations *location 103 95 ); 104 #endif105 96 106 /* 107 * _POSIX_Condition_variables_Is_null97 /** 98 * @brief POSIX Condition Variable Is NULL 108 99 * 109 * DESCRIPTION: 110 * 111 * This function returns TRUE if the_condition variable is NULL 100 * This function returns TRUE if @a the_condition variable is NULL 112 101 * and FALSE otherwise. 113 102 */ 114 115 103 RTEMS_INLINE_ROUTINE bool _POSIX_Condition_variables_Is_null ( 116 104 POSIX_Condition_variables_Control *the_condition_variable 117 ); 105 ) 106 { 107 return !the_condition_variable; 108 } 109 118 110 119 111 /** 120 112 * @brief Implements wake up version of the "signal" operation. 121 113 * 122 * DESCRIPTION:123 *124 114 * A support routine which implements guts of the broadcast and single task 125 115 * wake up version of the "signal" operation. … … 133 123 * @brief POSIX condition variables wait support. 134 124 * 135 * DESCRIPTION:136 *137 125 * A support routine which implements guts of the blocking, non-blocking, and 138 126 * timed wait version of condition variable wait routines. … … 145 133 ); 146 134 147 /*148 * _POSIX_Condition_variables_Get149 *150 * DESCRIPTION:151 *152 * A support routine which translates the condition variable id into153 * a local pointer. As a side-effect, it may create the condition154 * variable.155 */156 157 POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (158 pthread_cond_t *cond,159 Objects_Locations *location160 );161 162 /*163 * _POSIX_Condition_variables_Allocate164 */165 166 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control167 *_POSIX_Condition_variables_Allocate( void )168 {169 return (POSIX_Condition_variables_Control *)170 _Objects_Allocate( &_POSIX_Condition_variables_Information );171 }172 173 /*174 * _POSIX_Condition_variables_Free175 */176 177 RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (178 POSIX_Condition_variables_Control *the_condition_variable179 )180 {181 _Objects_Free(182 &_POSIX_Condition_variables_Information,183 &the_condition_variable->Object184 );185 }186 187 /*188 * _POSIX_Condition_variables_Is_null189 */190 191 RTEMS_INLINE_ROUTINE bool _POSIX_Condition_variables_Is_null (192 POSIX_Condition_variables_Control *the_condition_variable193 )194 {195 return !the_condition_variable;196 }197 198 135 #ifdef __cplusplus 199 136 }
Note: See TracChangeset
for help on using the changeset viewer.