Changeset 3380ee8 in rtems for cpukit/score/src/threaddispatchdisablelevel.c
- Timestamp:
- 04/22/14 05:46:53 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- e10574a
- Parents:
- f17e171
- git-author:
- Sebastian Huber <sebastian.huber@…> (04/22/14 05:46:53)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (04/22/14 06:34:45)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/src/threaddispatchdisablelevel.c
rf17e171 r3380ee8 35 35 }; 36 36 37 static void _Giant_Do_acquire( Per_CPU_Control * self_cpu)37 static void _Giant_Do_acquire( Per_CPU_Control *cpu_self ) 38 38 { 39 39 Giant_Control *giant = &_Giant; 40 40 41 if ( giant->owner_cpu != self_cpu) {42 _SMP_lock_Acquire( &giant->lock, & self_cpu->Giant_lock_context );43 giant->owner_cpu = self_cpu;41 if ( giant->owner_cpu != cpu_self ) { 42 _SMP_lock_Acquire( &giant->lock, &cpu_self->Giant_lock_context ); 43 giant->owner_cpu = cpu_self; 44 44 giant->nest_level = 1; 45 45 } else { … … 48 48 } 49 49 50 static void _Giant_Do_release( Per_CPU_Control * self_cpu)50 static void _Giant_Do_release( Per_CPU_Control *cpu_self ) 51 51 { 52 52 Giant_Control *giant = &_Giant; … … 55 55 if ( giant->nest_level == 0 ) { 56 56 giant->owner_cpu = NO_OWNER_CPU; 57 _SMP_lock_Release( &giant->lock, & self_cpu->Giant_lock_context );57 _SMP_lock_Release( &giant->lock, &cpu_self->Giant_lock_context ); 58 58 } 59 59 } 60 60 61 void _Giant_Drop( Per_CPU_Control * self_cpu)61 void _Giant_Drop( Per_CPU_Control *cpu_self ) 62 62 { 63 63 Giant_Control *giant = &_Giant; … … 65 65 _Assert( _ISR_Get_level() != 0 ); 66 66 67 if ( giant->owner_cpu == self_cpu) {67 if ( giant->owner_cpu == cpu_self ) { 68 68 giant->nest_level = 0; 69 69 giant->owner_cpu = NO_OWNER_CPU; 70 _SMP_lock_Release( &giant->lock, & self_cpu->Giant_lock_context );70 _SMP_lock_Release( &giant->lock, &cpu_self->Giant_lock_context ); 71 71 } 72 72 } … … 76 76 ISR_Level isr_level; 77 77 uint32_t disable_level; 78 Per_CPU_Control * self_cpu;78 Per_CPU_Control *cpu_self; 79 79 80 80 _ISR_Disable_without_giant( isr_level ); … … 84 84 * thread migration. 85 85 */ 86 self_cpu= _Per_CPU_Get();86 cpu_self = _Per_CPU_Get(); 87 87 88 _Giant_Do_acquire( self_cpu);88 _Giant_Do_acquire( cpu_self ); 89 89 90 disable_level = self_cpu->thread_dispatch_disable_level;91 _Profiling_Thread_dispatch_disable( self_cpu, disable_level );90 disable_level = cpu_self->thread_dispatch_disable_level; 91 _Profiling_Thread_dispatch_disable( cpu_self, disable_level ); 92 92 ++disable_level; 93 self_cpu->thread_dispatch_disable_level = disable_level;93 cpu_self->thread_dispatch_disable_level = disable_level; 94 94 95 95 _ISR_Enable_without_giant( isr_level ); … … 102 102 ISR_Level isr_level; 103 103 uint32_t disable_level; 104 Per_CPU_Control * self_cpu;104 Per_CPU_Control *cpu_self; 105 105 106 106 _ISR_Disable_without_giant( isr_level ); 107 107 108 self_cpu= _Per_CPU_Get();109 disable_level = self_cpu->thread_dispatch_disable_level;108 cpu_self = _Per_CPU_Get(); 109 disable_level = cpu_self->thread_dispatch_disable_level; 110 110 --disable_level; 111 self_cpu->thread_dispatch_disable_level = disable_level;111 cpu_self->thread_dispatch_disable_level = disable_level; 112 112 113 _Giant_Do_release( self_cpu);114 _Assert( disable_level != 0 || _Giant.owner_cpu != self_cpu);113 _Giant_Do_release( cpu_self ); 114 _Assert( disable_level != 0 || _Giant.owner_cpu != cpu_self ); 115 115 116 _Profiling_Thread_dispatch_enable( self_cpu, disable_level );116 _Profiling_Thread_dispatch_enable( cpu_self, disable_level ); 117 117 _ISR_Enable_without_giant( isr_level ); 118 118
Note: See TracChangeset
for help on using the changeset viewer.