Changeset cc757fe in rtems
- Timestamp:
- 08/07/96 20:57:28 (27 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- a14684c3
- Parents:
- c123a084
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/score/src/coremutex.c
rc123a084 rcc757fe 111 111 112 112 executing = _Thread_Executing; 113 switch ( the_mutex->Attributes.discipline ) { 114 case CORE_MUTEX_DISCIPLINES_FIFO: 115 case CORE_MUTEX_DISCIPLINES_PRIORITY: 116 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: 117 break; 118 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 119 if ( executing->current_priority < 120 the_mutex->Attributes.priority_ceiling) { 121 executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 122 return; 123 } 124 } 113 125 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 114 126 _ISR_Disable( level ); … … 124 136 case CORE_MUTEX_DISCIPLINES_PRIORITY: 125 137 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: 138 /* already the highest priority */ 126 139 break; 127 140 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 141 if ( the_mutex->Attributes.priority_ceiling < 142 executing->current_priority ) { 128 143 _Thread_Change_priority( 129 executing,144 the_mutex->holder, 130 145 the_mutex->Attributes.priority_ceiling 131 146 ); 132 break;147 } 133 148 } 134 149 return; … … 181 196 break; 182 197 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 183 _Thread_Change_priority( 184 executing, 185 the_mutex->Attributes.priority_ceiling 186 ); 198 if ( the_mutex->Attributes.priority_ceiling < 199 executing->current_priority ) { 200 _Thread_Change_priority( 201 executing, 202 the_mutex->Attributes.priority_ceiling 203 ); 204 }; 187 205 break; 188 206 } -
cpukit/score/src/coremutex.c
rc123a084 rcc757fe 111 111 112 112 executing = _Thread_Executing; 113 switch ( the_mutex->Attributes.discipline ) { 114 case CORE_MUTEX_DISCIPLINES_FIFO: 115 case CORE_MUTEX_DISCIPLINES_PRIORITY: 116 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: 117 break; 118 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 119 if ( executing->current_priority < 120 the_mutex->Attributes.priority_ceiling) { 121 executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 122 return; 123 } 124 } 113 125 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 114 126 _ISR_Disable( level ); … … 124 136 case CORE_MUTEX_DISCIPLINES_PRIORITY: 125 137 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: 138 /* already the highest priority */ 126 139 break; 127 140 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 141 if ( the_mutex->Attributes.priority_ceiling < 142 executing->current_priority ) { 128 143 _Thread_Change_priority( 129 executing,144 the_mutex->holder, 130 145 the_mutex->Attributes.priority_ceiling 131 146 ); 132 break;147 } 133 148 } 134 149 return; … … 181 196 break; 182 197 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 183 _Thread_Change_priority( 184 executing, 185 the_mutex->Attributes.priority_ceiling 186 ); 198 if ( the_mutex->Attributes.priority_ceiling < 199 executing->current_priority ) { 200 _Thread_Change_priority( 201 executing, 202 the_mutex->Attributes.priority_ceiling 203 ); 204 }; 187 205 break; 188 206 }
Note: See TracChangeset
for help on using the changeset viewer.