Changeset f4d1f30 in rtems
- Timestamp:
- 06/22/16 15:09:56 (7 years ago)
- Branches:
- 5, master
- Children:
- ac8402dd
- Parents:
- 0b836337
- git-author:
- Sebastian Huber <sebastian.huber@…> (06/22/16 15:09:56)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (07/27/16 08:55:30)
- Location:
- cpukit/score
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/include/rtems/score/threadimpl.h
r0b836337 rf4d1f30 460 460 void *arg 461 461 ); 462 463 Thread_Control *_Thread_Apply_priority( 464 Thread_Control *the_thread, 465 Priority_Control new_priority, 466 void *arg, 467 Thread_Change_priority_filter filter, 468 bool prepend_it 469 ); 470 471 void _Thread_Update_priority( Thread_Control *the_thread ); 462 472 463 473 /** -
cpukit/score/src/threadchangepriority.c
r0b836337 rf4d1f30 23 23 #include <rtems/score/schedulerimpl.h> 24 24 25 void _Thread_Change_priority(25 static Thread_Control *_Thread_Apply_priority_locked( 26 26 Thread_Control *the_thread, 27 27 Priority_Control new_priority, … … 31 31 ) 32 32 { 33 ISR_lock_Context lock_context;34 ISR_lock_Control *lock;35 36 lock = _Thread_Lock_acquire( the_thread, &lock_context );37 38 33 /* 39 34 * For simplicity set the priority restore hint unconditionally since this is … … 63 58 the_thread->Wait.queue 64 59 ); 65 66 _Thread_Lock_release( lock, &lock_context ); 60 } else { 61 the_thread = NULL; 62 } 63 64 return the_thread; 65 } 66 67 Thread_Control *_Thread_Apply_priority( 68 Thread_Control *the_thread, 69 Priority_Control new_priority, 70 void *arg, 71 Thread_Change_priority_filter filter, 72 bool prepend_it 73 ) 74 { 75 ISR_lock_Context lock_context; 76 ISR_lock_Control *lock; 77 78 lock = _Thread_Lock_acquire( the_thread, &lock_context ); 79 the_thread = _Thread_Apply_priority_locked( 80 the_thread, 81 new_priority, 82 arg, 83 filter, 84 prepend_it 85 ); 86 _Thread_Lock_release( lock, &lock_context ); 87 return the_thread; 88 } 89 90 void _Thread_Update_priority( Thread_Control *the_thread ) 91 { 92 if ( the_thread != NULL ) { 93 ISR_lock_Context lock_context; 67 94 68 95 _Thread_State_acquire( the_thread, &lock_context ); 69 96 _Scheduler_Update_priority( the_thread ); 70 97 _Thread_State_release( the_thread, &lock_context ); 71 } else {72 _Thread_Lock_release( lock, &lock_context );73 98 } 99 } 100 101 void _Thread_Change_priority( 102 Thread_Control *the_thread, 103 Priority_Control new_priority, 104 void *arg, 105 Thread_Change_priority_filter filter, 106 bool prepend_it 107 ) 108 { 109 the_thread = _Thread_Apply_priority( 110 the_thread, 111 new_priority, 112 arg, 113 filter, 114 prepend_it 115 ); 116 _Thread_Update_priority( the_thread ); 74 117 } 75 118
Note: See TracChangeset
for help on using the changeset viewer.