diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-26 14:10:25 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-30 09:53:23 +0200 |
commit | fe52e7c07cc330e98484fd4acc38586722b93132 (patch) | |
tree | 3fb3e92e5174a2c2e636eb53efd9cacf36ab58c4 /cpukit/score/src/percpu.c | |
parent | smp: Use Thread_Control.is_executing (diff) | |
download | rtems-fe52e7c07cc330e98484fd4acc38586722b93132.tar.bz2 |
smp: Add and use _Per_CPU_Get()
Add and use _Per_CPU_Get_by_index() and _Per_CPU_Get_index(). Add
_Per_CPU_Send_interrupt(). This avoids direct access of
_Per_CPU_Information.
Diffstat (limited to 'cpukit/score/src/percpu.c')
-rw-r--r-- | cpukit/score/src/percpu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpukit/score/src/percpu.c b/cpukit/score/src/percpu.c index 74056a7289..5e1a917e1b 100644 --- a/cpukit/score/src/percpu.c +++ b/cpukit/score/src/percpu.c @@ -39,10 +39,10 @@ /* * Initialize per cpu pointer table */ - _Per_CPU_Information_p[0] = &_Per_CPU_Information[0]; + _Per_CPU_Information_p[0] = _Per_CPU_Get_by_index( 0 ); for ( cpu = 1 ; cpu < max_cpus; ++cpu ) { - Per_CPU_Control *p = &_Per_CPU_Information[cpu]; + Per_CPU_Control *p = _Per_CPU_Get_by_index( cpu ); _Per_CPU_Information_p[cpu] = p; @@ -68,8 +68,10 @@ _SMP_Processor_count = max_cpus; for ( cpu = 1 ; cpu < max_cpus; ++cpu ) { + const Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu ); + _Per_CPU_Wait_for_state( - &_Per_CPU_Information[ cpu ], + per_cpu, PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING ); } |