RCS file: /usr1/CVS/rtems/cpukit/score/src/smp.c,v
retrieving revision 1.9
diff -u -r1.9 smp.c
|
|
|
176 | 176 | #endif |
177 | 177 | |
178 | 178 | level = _SMP_lock_spinlock_simple_Obtain( &_Per_CPU_Information[cpu].lock ); |
179 | | _Per_CPU_Information[cpu].message |= message; |
| 179 | if (_Per_CPU_Information[cpu].message == 0) { |
| 180 | _Per_CPU_Information[cpu].message = message; |
| 181 | bsp_smp_interrupt_cpu( cpu ); |
| 182 | } else { |
| 183 | _Per_CPU_Information[cpu].message |= message; |
| 184 | } |
180 | 185 | _SMP_lock_spinlock_simple_Release( &_Per_CPU_Information[cpu].lock, level ); |
181 | | bsp_smp_interrupt_cpu( cpu ); |
182 | 186 | } |
183 | 187 | |
184 | 188 | /* |
… |
… |
|
197 | 201 | for ( dest_cpu=0 ; dest_cpu < _SMP_Processor_count; dest_cpu++ ) { |
198 | 202 | if ( cpu == dest_cpu ) |
199 | 203 | continue; |
200 | | level = _SMP_lock_spinlock_simple_Obtain( &_Per_CPU_Information[cpu].lock ); |
201 | | _Per_CPU_Information[dest_cpu].message |= message; |
202 | | _SMP_lock_spinlock_simple_Release( &_Per_CPU_Information[cpu].lock, level ); |
| 204 | level = _SMP_lock_spinlock_simple_Obtain( &_Per_CPU_Information[dest_cpu].lock ); |
| 205 | if (_Per_CPU_Information[dest_cpu].message == 0) { |
| 206 | _Per_CPU_Information[dest_cpu].message = message; |
| 207 | bsp_smp_interrupt_cpu( dest_cpu ); |
| 208 | } else { |
| 209 | _Per_CPU_Information[dest_cpu].message |= message; |
| 210 | } |
| 211 | _SMP_lock_spinlock_simple_Release( &_Per_CPU_Information[dest_cpu].lock, level ); |
203 | 212 | } |
204 | | bsp_smp_broadcast_interrupt(); |
205 | 213 | } |
206 | 214 | |
207 | 215 | /* |
… |
… |
|
230 | 238 | |
231 | 239 | if ( !_System_state_Is_up (_System_state_Current) ) |
232 | 240 | return; |
233 | | for (i=1 ; i < _SMP_Processor_count ; i++ ) { |
| 241 | for (i=0 ; i < _SMP_Processor_count ; i++ ) { |
234 | 242 | if ( cpu == i ) |
235 | 243 | continue; |
236 | 244 | if ( _Per_CPU_Information[i].state != RTEMS_BSP_SMP_CPU_UP ) |