summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-14 14:26:34 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-14 16:26:07 +0200
commitedde99bd213d20c55430dd29089e0d8a807ab6d8 (patch)
tree186fbfb97c296606a1584fd224777b3f6ed5f98e /cpukit/score/src
parentscore: Add and use _Thread_Dispatch_if_necessary() (diff)
downloadrtems-edde99bd213d20c55430dd29089e0d8a807ab6d8.tar.bz2
score: Rename rtems_smp_get_number_of_processors()
Rename in rtems_smp_get_processor_count(). Always provide <rtems/score/smp.h> and <rtems/rtems/smp.h>. Add _SMP_Get_processor_count(). This function will be a compile time constant defined to be one on uni-processor configurations. This allows iterations over all processors without overhead on uni-processor configurations.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/smp.c8
-rw-r--r--cpukit/score/src/threadcreateidle.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
index a8d8f4986f..10acbe25de 100644
--- a/cpukit/score/src/smp.c
+++ b/cpukit/score/src/smp.c
@@ -126,7 +126,7 @@ void _SMP_Send_message( int cpu, uint32_t message )
void _SMP_Broadcast_message( uint32_t message )
{
int self = bsp_smp_processor_id();
- int ncpus = _SMP_Processor_count;
+ int ncpus = _SMP_Get_processor_count();
int cpu;
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
@@ -146,7 +146,7 @@ void _SMP_Broadcast_message( uint32_t message )
void _SMP_Request_other_cores_to_perform_first_context_switch( void )
{
int self = bsp_smp_processor_id();
- int ncpus = _SMP_Processor_count;
+ int ncpus = _SMP_Get_processor_count();
int cpu;
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
@@ -165,7 +165,7 @@ void _SMP_Request_other_cores_to_dispatch( void )
{
if ( _System_state_Is_up( _System_state_Get() ) ) {
int self = bsp_smp_processor_id();
- int ncpus = _SMP_Processor_count;
+ int ncpus = _SMP_Get_processor_count();
int cpu;
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
@@ -185,7 +185,7 @@ void _SMP_Request_other_cores_to_dispatch( void )
void _SMP_Request_other_cores_to_shutdown( void )
{
int self = bsp_smp_processor_id();
- int ncpus = _SMP_Processor_count;
+ int ncpus = _SMP_Get_processor_count();
int cpu;
_SMP_Broadcast_message( RTEMS_BSP_SMP_SHUTDOWN );
diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c
index e4581c8ecb..f90db795bf 100644
--- a/cpukit/score/src/threadcreateidle.c
+++ b/cpukit/score/src/threadcreateidle.c
@@ -89,7 +89,7 @@ void _Thread_Create_idle( void )
#if defined(RTEMS_SMP)
int cpu;
- for ( cpu=0 ; cpu < _SMP_Processor_count ; cpu++ ) {
+ for ( cpu=0 ; cpu < _SMP_Get_processor_count() ; cpu++ ) {
_Thread_Create_idle_helper(
_Objects_Build_name( 'I', 'D', 'L', 'E' ),
cpu