Changeset 4c23fa4 in rtems for cpukit/score/src/threaddispatchdisablelevel.c
- Timestamp:
- 04/22/14 05:46:47 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 861346d1
- Parents:
- 774edf2c
- git-author:
- Sebastian Huber <sebastian.huber@…> (04/22/14 05:46:47)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (04/22/14 06:34:45)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/src/threaddispatchdisablelevel.c
r774edf2c r4c23fa4 21 21 #include <rtems/score/sysstate.h> 22 22 23 #define NO_OWNER_CPU 0xffffffffU23 #define NO_OWNER_CPU NULL 24 24 25 25 typedef struct { 26 26 SMP_lock_Control lock; 27 uint32_towner_cpu;27 Per_CPU_Control *owner_cpu; 28 28 uint32_t nest_level; 29 29 } Giant_Control; … … 38 38 { 39 39 Giant_Control *giant = &_Giant; 40 uint32_t self_cpu_index = _Per_CPU_Get_index( self_cpu );41 40 42 if ( giant->owner_cpu != self_cpu _index) {41 if ( giant->owner_cpu != self_cpu ) { 43 42 _SMP_lock_Acquire( &giant->lock, &self_cpu->Giant_lock_context ); 44 giant->owner_cpu = self_cpu _index;43 giant->owner_cpu = self_cpu; 45 44 giant->nest_level = 1; 46 45 } else { … … 63 62 { 64 63 Giant_Control *giant = &_Giant; 65 uint32_t self_cpu_index = _Per_CPU_Get_index( self_cpu );66 64 67 65 _Assert( _ISR_Get_level() != 0 ); 68 66 69 if ( giant->owner_cpu == self_cpu _index) {67 if ( giant->owner_cpu == self_cpu ) { 70 68 giant->nest_level = 0; 71 69 giant->owner_cpu = NO_OWNER_CPU; … … 114 112 115 113 _Giant_Do_release( self_cpu ); 116 _Assert( disable_level != 0 || _Giant.owner_cpu == NO_OWNER_CPU);114 _Assert( disable_level != 0 || _Giant.owner_cpu != self_cpu ); 117 115 118 116 _Profiling_Thread_dispatch_enable( self_cpu, disable_level ); … … 147 145 Giant_Control *giant = &_Giant; 148 146 149 return giant->owner_cpu == _ SMP_Get_current_processor()147 return giant->owner_cpu == _Per_CPU_Get_snapshot() 150 148 || !_System_state_Is_up( _System_state_Get() ); 151 149 }
Note: See TracChangeset
for help on using the changeset viewer.