Changeset f926b34 in rtems
- Timestamp:
- 03/08/97 03:51:55 (27 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 133fb0e5
- Parents:
- dab057a
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/posix/src/pthread.c
rdab057a rf926b34 78 78 if ( the_thread->resource_count == 0 || 79 79 the_thread->current_priority > new_priority ) 80 _Thread_Change_priority( the_thread, new_priority );80 _Thread_Change_priority( the_thread, new_priority, TRUE ); 81 81 82 82 ticks = _POSIX_Timespec_to_interval( &api->schedparam.ss_replenish_period ); … … 115 115 if ( the_thread->resource_count == 0 || 116 116 the_thread->current_priority > new_priority ) 117 _Thread_Change_priority( the_thread, new_priority );117 _Thread_Change_priority( the_thread, new_priority, TRUE ); 118 118 } 119 119 … … 657 657 _POSIX_Priority_To_core( api->schedparam.sched_priority ); 658 658 659 _Thread_Change_priority( the_thread, the_thread->real_priority ); 659 _Thread_Change_priority( 660 the_thread, 661 the_thread->real_priority, 662 TRUE 663 ); 660 664 break; 661 665 -
c/src/exec/score/headers/thread.h
rdab057a rf926b34 562 562 void _Thread_Change_priority ( 563 563 Thread_Control *the_thread, 564 Priority_Control new_priority 564 Priority_Control new_priority, 565 boolean prepend_it 565 566 ); 566 567 -
c/src/exec/score/include/rtems/score/thread.h
rdab057a rf926b34 562 562 void _Thread_Change_priority ( 563 563 Thread_Control *the_thread, 564 Priority_Control new_priority 564 Priority_Control new_priority, 565 boolean prepend_it 565 566 ); 566 567 -
c/src/exec/score/src/coremutex.c
rdab057a rf926b34 143 143 _Thread_Change_priority( 144 144 the_mutex->holder, 145 the_mutex->Attributes.priority_ceiling 145 the_mutex->Attributes.priority_ceiling, 146 FALSE 146 147 ); 147 148 } … … 181 182 _Thread_Change_priority( 182 183 the_mutex->holder, 183 executing->current_priority 184 executing->current_priority, 185 FALSE 184 186 ); 185 187 } … … 200 202 _Thread_Change_priority( 201 203 executing, 202 the_mutex->Attributes.priority_ceiling 204 the_mutex->Attributes.priority_ceiling, 205 FALSE 203 206 ); 204 207 }; … … 263 266 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 264 267 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: 265 if ( executing->resource_count == 0 && 266 executing->real_priority != 267 executing->current_priority ) { 268 _Thread_Change_priority( executing, executing->real_priority ); 268 if ( executing->resource_count == 0 && 269 executing->real_priority != executing->current_priority ) { 270 _Thread_Change_priority( executing, executing->real_priority, TRUE ); 269 271 } 270 272 break; -
c/src/exec/score/src/thread.c
rdab057a rf926b34 1207 1207 * the_thread - pointer to thread control block 1208 1208 * new_priority - ultimate priority 1209 * prepend_it - TRUE if the thread should be prepended to the chain 1209 1210 * 1210 1211 * Output parameters: NONE … … 1217 1218 void _Thread_Change_priority( 1218 1219 Thread_Control *the_thread, 1219 Priority_Control new_priority 1220 Priority_Control new_priority, 1221 boolean prepend_it 1220 1222 ) 1221 1223 { 1222 1224 ISR_Level level; 1223 1225 /* boolean do_prepend = FALSE; */ 1226 1227 /* 1228 * If this is a case where prepending the task to its priority is 1229 * potentially desired, then we need to consider whether to do it. 1230 * This usually occurs when a task lowers its priority implcitly as 1231 * the result of losing inherited priority. Normal explicit priority 1232 * change calls (e.g. rtems_task_set_priority) should always do an 1233 * append not a prepend. 1234 */ 1235 1236 /* 1237 * Techically, the prepend should conditional on the thread lowering 1238 * its priority but that does allow cxd2004 of the acvc 2.0.1 to 1239 * pass with rtems 4.0.0. This should change when gnat redoes its 1240 * priority scheme. 1241 */ 1242 /* 1243 if ( prepend_it && 1244 _Thread_Is_executing( the_thread ) && 1245 new_priority >= the_thread->current_priority ) 1246 prepend_it = TRUE; 1247 */ 1248 1224 1249 _Thread_Set_transient( the_thread ); 1225 1250 … … 1238 1263 1239 1264 _Priority_Add_to_bit_map( &the_thread->Priority_map ); 1240 _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 1265 if ( prepend_it ) 1266 _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); 1267 else 1268 _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 1241 1269 1242 1270 _ISR_Flash( level ); … … 1247 1275 _Thread_Executing->is_preemptible ) 1248 1276 _Context_Switch_necessary = TRUE; 1249 1250 1277 _ISR_Enable( level ); 1251 1278 } -
cpukit/posix/src/pthread.c
rdab057a rf926b34 78 78 if ( the_thread->resource_count == 0 || 79 79 the_thread->current_priority > new_priority ) 80 _Thread_Change_priority( the_thread, new_priority );80 _Thread_Change_priority( the_thread, new_priority, TRUE ); 81 81 82 82 ticks = _POSIX_Timespec_to_interval( &api->schedparam.ss_replenish_period ); … … 115 115 if ( the_thread->resource_count == 0 || 116 116 the_thread->current_priority > new_priority ) 117 _Thread_Change_priority( the_thread, new_priority );117 _Thread_Change_priority( the_thread, new_priority, TRUE ); 118 118 } 119 119 … … 657 657 _POSIX_Priority_To_core( api->schedparam.sched_priority ); 658 658 659 _Thread_Change_priority( the_thread, the_thread->real_priority ); 659 _Thread_Change_priority( 660 the_thread, 661 the_thread->real_priority, 662 TRUE 663 ); 660 664 break; 661 665 -
cpukit/score/include/rtems/score/thread.h
rdab057a rf926b34 562 562 void _Thread_Change_priority ( 563 563 Thread_Control *the_thread, 564 Priority_Control new_priority 564 Priority_Control new_priority, 565 boolean prepend_it 565 566 ); 566 567 -
cpukit/score/src/coremutex.c
rdab057a rf926b34 143 143 _Thread_Change_priority( 144 144 the_mutex->holder, 145 the_mutex->Attributes.priority_ceiling 145 the_mutex->Attributes.priority_ceiling, 146 FALSE 146 147 ); 147 148 } … … 181 182 _Thread_Change_priority( 182 183 the_mutex->holder, 183 executing->current_priority 184 executing->current_priority, 185 FALSE 184 186 ); 185 187 } … … 200 202 _Thread_Change_priority( 201 203 executing, 202 the_mutex->Attributes.priority_ceiling 204 the_mutex->Attributes.priority_ceiling, 205 FALSE 203 206 ); 204 207 }; … … 263 266 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 264 267 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: 265 if ( executing->resource_count == 0 && 266 executing->real_priority != 267 executing->current_priority ) { 268 _Thread_Change_priority( executing, executing->real_priority ); 268 if ( executing->resource_count == 0 && 269 executing->real_priority != executing->current_priority ) { 270 _Thread_Change_priority( executing, executing->real_priority, TRUE ); 269 271 } 270 272 break; -
cpukit/score/src/thread.c
rdab057a rf926b34 1207 1207 * the_thread - pointer to thread control block 1208 1208 * new_priority - ultimate priority 1209 * prepend_it - TRUE if the thread should be prepended to the chain 1209 1210 * 1210 1211 * Output parameters: NONE … … 1217 1218 void _Thread_Change_priority( 1218 1219 Thread_Control *the_thread, 1219 Priority_Control new_priority 1220 Priority_Control new_priority, 1221 boolean prepend_it 1220 1222 ) 1221 1223 { 1222 1224 ISR_Level level; 1223 1225 /* boolean do_prepend = FALSE; */ 1226 1227 /* 1228 * If this is a case where prepending the task to its priority is 1229 * potentially desired, then we need to consider whether to do it. 1230 * This usually occurs when a task lowers its priority implcitly as 1231 * the result of losing inherited priority. Normal explicit priority 1232 * change calls (e.g. rtems_task_set_priority) should always do an 1233 * append not a prepend. 1234 */ 1235 1236 /* 1237 * Techically, the prepend should conditional on the thread lowering 1238 * its priority but that does allow cxd2004 of the acvc 2.0.1 to 1239 * pass with rtems 4.0.0. This should change when gnat redoes its 1240 * priority scheme. 1241 */ 1242 /* 1243 if ( prepend_it && 1244 _Thread_Is_executing( the_thread ) && 1245 new_priority >= the_thread->current_priority ) 1246 prepend_it = TRUE; 1247 */ 1248 1224 1249 _Thread_Set_transient( the_thread ); 1225 1250 … … 1238 1263 1239 1264 _Priority_Add_to_bit_map( &the_thread->Priority_map ); 1240 _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 1265 if ( prepend_it ) 1266 _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); 1267 else 1268 _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 1241 1269 1242 1270 _ISR_Flash( level ); … … 1247 1275 _Thread_Executing->is_preemptible ) 1248 1276 _Context_Switch_necessary = TRUE; 1249 1250 1277 _ISR_Enable( level ); 1251 1278 }
Note: See TracChangeset
for help on using the changeset viewer.