Changeset 825cb1f in rtems for cpukit/score/src/threaddispatchdisablelevel.c
- Timestamp:
- 03/04/14 12:02:18 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 3ca84d0c
- Parents:
- b323e1fb
- git-author:
- Sebastian Huber <sebastian.huber@…> (03/04/14 12:02:18)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (03/06/14 08:43:59)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/src/threaddispatchdisablelevel.c
rb323e1fb r825cb1f 119 119 } 120 120 121 122 /*123 * Note this method is taking a heavy handed approach to124 * setting the dispatch level. This may be optimized at a125 * later timee, but it must be in such a way that the nesting126 * level is decremented by the same number as the dispatch level.127 * This approach is safest until we are sure the nested spinlock128 * is successfully working with smp isr source code.129 */130 131 uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)132 {133 ISR_Level isr_level;134 uint32_t disable_level;135 136 _ISR_Disable_without_giant( isr_level );137 disable_level = _Thread_Dispatch_disable_level;138 _ISR_Enable_without_giant( isr_level );139 140 /*141 * If we need the dispatch level to go higher142 * call increment method the desired number of times.143 */144 145 while ( value > disable_level ) {146 disable_level = _Thread_Dispatch_increment_disable_level();147 }148 149 /*150 * If we need the dispatch level to go lower151 * call increment method the desired number of times.152 */153 154 while ( value < disable_level ) {155 disable_level = _Thread_Dispatch_decrement_disable_level();156 }157 158 return value;159 }160 161 121 void _Giant_Acquire( void ) 162 122 {
Note: See TracChangeset
for help on using the changeset viewer.