diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-10 10:58:27 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-11 08:52:54 +0200 |
commit | 4bc8d2e71774452e66c619dad98ccab6db8a2324 (patch) | |
tree | 9bcbf057fa8bd77816542cab020b9348ba516062 /testsuites/smptests | |
parent | score: Statically initialize IO manager (diff) | |
download | rtems-4bc8d2e71774452e66c619dad98ccab6db8a2324.tar.bz2 |
rtems: Rename rtems_smp_get_processor_count()
Rename rtems_smp_get_processor_count() in rtems_get_processor_count().
Make rtems_get_processor_count() a function in uni-processor
configurations to enable ABI compatibility with SMP configurations.
Diffstat (limited to 'testsuites/smptests')
22 files changed, 33 insertions, 33 deletions
diff --git a/testsuites/smptests/smp01/init.c b/testsuites/smptests/smp01/init.c index 91a6e4056c..8439293d95 100644 --- a/testsuites/smptests/smp01/init.c +++ b/testsuites/smptests/smp01/init.c @@ -48,12 +48,12 @@ rtems_task Init( locked_print_initialize(); /* Initialize the TaskRan array */ - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) { + for ( i=0; i<rtems_get_processor_count() ; i++ ) { TaskRan[i] = false; } /* Create and start tasks for each processor */ - for ( i=0; i< rtems_smp_get_processor_count() ; i++ ) { + for ( i=0; i< rtems_get_processor_count() ; i++ ) { if ( i != cpu_self ) { ch = '0' + i; @@ -78,7 +78,7 @@ rtems_task Init( /* Wait on the all tasks to run */ while (1) { allDone = true; - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) { + for ( i=0; i<rtems_get_processor_count() ; i++ ) { if ( i != cpu_self && TaskRan[i] == false) allDone = false; } diff --git a/testsuites/smptests/smp02/init.c b/testsuites/smptests/smp02/init.c index c2cf5a39bd..05f6351b3a 100644 --- a/testsuites/smptests/smp02/init.c +++ b/testsuites/smptests/smp02/init.c @@ -40,7 +40,7 @@ rtems_task Init( locked_print_initialize(); - if ( rtems_smp_get_processor_count() == 1 ) { + if ( rtems_get_processor_count() == 1 ) { success(); } @@ -59,7 +59,7 @@ rtems_task Init( status = rtems_semaphore_obtain( Semaphore, RTEMS_WAIT, 0); directive_failed( status,"rtems_semaphore_obtain of SEM1\n"); - for ( i=1; i < rtems_smp_get_processor_count(); i++ ){ + for ( i=1; i < rtems_get_processor_count(); i++ ){ /* Create and start tasks for each CPU */ ch = '0' + i; diff --git a/testsuites/smptests/smp03/init.c b/testsuites/smptests/smp03/init.c index 0d0bb620d6..3acdfe981d 100644 --- a/testsuites/smptests/smp03/init.c +++ b/testsuites/smptests/smp03/init.c @@ -57,13 +57,13 @@ rtems_task Init( locked_print_initialize(); - if ( rtems_smp_get_processor_count() == 1 ) { + if ( rtems_get_processor_count() == 1 ) { success(); } /* Initialize the TaskRan array */ TaskRan[0] = true; - for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) { + for ( i=1; i<rtems_get_processor_count() ; i++ ) { TaskRan[i] = false; } @@ -71,7 +71,7 @@ rtems_task Init( PrintTaskInfo( "Init" ); /* for each remaining cpu create and start a task */ - for ( i=1; i < rtems_smp_get_processor_count(); i++ ){ + for ( i=1; i < rtems_get_processor_count(); i++ ){ ch = '0' + i; @@ -101,12 +101,12 @@ rtems_task Init( RTEMS_DEFAULT_ATTRIBUTES, &id ); - status = rtems_task_start(id,Test_task,rtems_smp_get_processor_count()); + status = rtems_task_start(id,Test_task,rtems_get_processor_count()); /* Wait on all tasks to run */ while (1) { TestFinished = true; - for ( i=1; i < (rtems_smp_get_processor_count()+1) ; i++ ) { + for ( i=1; i < (rtems_get_processor_count()+1) ; i++ ) { if (TaskRan[i] == false) TestFinished = false; } diff --git a/testsuites/smptests/smp05/init.c b/testsuites/smptests/smp05/init.c index 23669ec7cd..cf7ea3a10a 100644 --- a/testsuites/smptests/smp05/init.c +++ b/testsuites/smptests/smp05/init.c @@ -44,11 +44,11 @@ rtems_task Init( locked_print_initialize(); - if ( rtems_smp_get_processor_count() == 1 ) { + if ( rtems_get_processor_count() == 1 ) { success(); } - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) { + for ( i=0; i<rtems_get_processor_count() ; i++ ) { ch = '1' + i; status = rtems_task_create( diff --git a/testsuites/smptests/smp07/init.c b/testsuites/smptests/smp07/init.c index 5f9c4967b2..53993ce9c0 100644 --- a/testsuites/smptests/smp07/init.c +++ b/testsuites/smptests/smp07/init.c @@ -93,7 +93,7 @@ rtems_task Init( locked_print_initialize(); - if ( rtems_smp_get_processor_count() == 1 ) { + if ( rtems_get_processor_count() == 1 ) { success(); } diff --git a/testsuites/smptests/smp08/init.c b/testsuites/smptests/smp08/init.c index 416c82bf72..d759c13165 100644 --- a/testsuites/smptests/smp08/init.c +++ b/testsuites/smptests/smp08/init.c @@ -76,7 +76,7 @@ rtems_task Init( /* Show that the init task is running on this cpu */ PrintTaskInfo( "Init", &time ); - for ( i=1; i <= rtems_smp_get_processor_count() *3; i++ ) { + for ( i=1; i <= rtems_get_processor_count() *3; i++ ) { sprintf(ch, "%02" PRId32, i ); status = rtems_task_create( diff --git a/testsuites/smptests/smp09/init.c b/testsuites/smptests/smp09/init.c index 7128198d58..09e9c09297 100644 --- a/testsuites/smptests/smp09/init.c +++ b/testsuites/smptests/smp09/init.c @@ -45,7 +45,7 @@ rtems_task Init( for ( killtime=0; killtime<1000000; killtime++ ) ; - for ( i=0; i<rtems_smp_get_processor_count() -1; i++ ) { + for ( i=0; i<rtems_get_processor_count() -1; i++ ) { ch = '1' + i; status = rtems_task_create( diff --git a/testsuites/smptests/smpaffinity01/init.c b/testsuites/smptests/smpaffinity01/init.c index cc5f32130e..06d5719438 100644 --- a/testsuites/smptests/smpaffinity01/init.c +++ b/testsuites/smptests/smpaffinity01/init.c @@ -112,7 +112,7 @@ void Validate_affinity(void ) directive_failed( sc, "Get Affinity of Init Task" ); /* Get the number of processors that we are using. */ - cpu_count = rtems_smp_get_processor_count(); + cpu_count = rtems_get_processor_count(); /* Fill the remaining cpus with med priority tasks */ puts( "Init - Create Medium priority tasks"); diff --git a/testsuites/smptests/smpatomic01/init.c b/testsuites/smptests/smpatomic01/init.c index e055ea4c5a..283200bd5d 100644 --- a/testsuites/smptests/smpatomic01/init.c +++ b/testsuites/smptests/smpatomic01/init.c @@ -446,7 +446,7 @@ static void test(void) test_static_and_dynamic_initialization(); - ctx->worker_count = rtems_smp_get_processor_count(); + ctx->worker_count = rtems_get_processor_count(); sc = rtems_timer_create( rtems_build_name('S', 'T', 'O', 'P'), diff --git a/testsuites/smptests/smpfatal01/init.c b/testsuites/smptests/smpfatal01/init.c index 0ba627a138..178148b123 100644 --- a/testsuites/smptests/smpfatal01/init.c +++ b/testsuites/smptests/smpfatal01/init.c @@ -69,7 +69,7 @@ static rtems_status_code test_driver_init( ) { uint32_t self = rtems_smp_get_current_processor(); - uint32_t cpu_count = rtems_smp_get_processor_count(); + uint32_t cpu_count = rtems_get_processor_count(); uint32_t cpu; rtems_test_begink(); diff --git a/testsuites/smptests/smpfatal02/init.c b/testsuites/smptests/smpfatal02/init.c index c801a287b9..fb42e5d411 100644 --- a/testsuites/smptests/smpfatal02/init.c +++ b/testsuites/smptests/smpfatal02/init.c @@ -77,7 +77,7 @@ static rtems_status_code test_driver_init( ) { uint32_t self = rtems_smp_get_current_processor(); - uint32_t cpu_count = rtems_smp_get_processor_count(); + uint32_t cpu_count = rtems_get_processor_count(); uint32_t cpu; rtems_test_begink(); diff --git a/testsuites/smptests/smpfatal03/init.c b/testsuites/smptests/smpfatal03/init.c index 714e7b9ee4..13a9db511a 100644 --- a/testsuites/smptests/smpfatal03/init.c +++ b/testsuites/smptests/smpfatal03/init.c @@ -68,7 +68,7 @@ static void wait_for_giant(void) static void Init(rtems_task_argument arg) { uint32_t self = rtems_smp_get_current_processor(); - uint32_t cpu_count = rtems_smp_get_processor_count(); + uint32_t cpu_count = rtems_get_processor_count(); rtems_test_begink(); diff --git a/testsuites/smptests/smpload01/init.c b/testsuites/smptests/smpload01/init.c index b26437c95d..e85d89e780 100644 --- a/testsuites/smptests/smpload01/init.c +++ b/testsuites/smptests/smpload01/init.c @@ -81,7 +81,7 @@ static void inherit_obtain_task(rtems_task_argument arg) test_context *ctx = &test_instance; rtems_status_code sc; SMP_barrier_State barrier_state = SMP_BARRIER_STATE_INITIALIZER; - uint32_t cpu_count = rtems_smp_get_processor_count(); + uint32_t cpu_count = rtems_get_processor_count(); rtems_counter_ticks delay = (cpu_count - 1 - arg) * ctx->inherit_obtain_delay; while (true) { @@ -338,7 +338,7 @@ static void test(void) sc = rtems_event_transient_receive(RTEMS_WAIT, RTEMS_NO_TIMEOUT); rtems_test_assert(sc == RTEMS_SUCCESSFUL); - for (i = 0; i < rtems_smp_get_processor_count(); ++i) { + for (i = 0; i < rtems_get_processor_count(); ++i) { sc = rtems_task_create( rtems_build_name('I', 'N', 'H', 'O'), INHERIT_OBTAIN_PRIO_BASE + i, @@ -373,7 +373,7 @@ static void test(void) ctx->inherit_release_counter ); - for (i = 0; i < rtems_smp_get_processor_count(); ++i) { + for (i = 0; i < rtems_get_processor_count(); ++i) { printf( "priority inheritance obtain count %2" PRIu32 ": %" PRIu64 "\n", i, diff --git a/testsuites/smptests/smplock01/init.c b/testsuites/smptests/smplock01/init.c index f0d9c92ebe..85995e8e99 100644 --- a/testsuites/smptests/smplock01/init.c +++ b/testsuites/smptests/smplock01/init.c @@ -259,7 +259,7 @@ static void run_tests( static void task(rtems_task_argument arg) { global_context *ctx = (global_context *) arg; - uint32_t cpu_count = rtems_smp_get_processor_count(); + uint32_t cpu_count = rtems_get_processor_count(); uint32_t cpu_self = rtems_smp_get_current_processor(); rtems_status_code sc; SMP_barrier_State bs = SMP_BARRIER_STATE_INITIALIZER; @@ -273,7 +273,7 @@ static void task(rtems_task_argument arg) static void test(void) { global_context *ctx = &context; - uint32_t cpu_count = rtems_smp_get_processor_count(); + uint32_t cpu_count = rtems_get_processor_count(); uint32_t cpu_self = rtems_smp_get_current_processor(); uint32_t cpu; int test; diff --git a/testsuites/smptests/smpmigration01/init.c b/testsuites/smptests/smpmigration01/init.c index e4929119b8..fe321c8787 100644 --- a/testsuites/smptests/smpmigration01/init.c +++ b/testsuites/smptests/smpmigration01/init.c @@ -224,7 +224,7 @@ static void Init(rtems_task_argument arg) { TEST_BEGIN(); - if (rtems_smp_get_processor_count() >= 2) { + if (rtems_get_processor_count() >= 2) { test(); } diff --git a/testsuites/smptests/smppsxaffinity01/init.c b/testsuites/smptests/smppsxaffinity01/init.c index 54851490a9..cb9e0b37d9 100644 --- a/testsuites/smptests/smppsxaffinity01/init.c +++ b/testsuites/smptests/smppsxaffinity01/init.c @@ -106,7 +106,7 @@ void Validate_attr(void ) rtems_test_assert( priority != -1 ); - cpus = rtems_smp_get_processor_count(); + cpus = rtems_get_processor_count(); puts( "Init - Validate pthread_attr_setaffinity_np and " "pthread_attr_getaffinity_np" diff --git a/testsuites/smptests/smppsxaffinity02/init.c b/testsuites/smptests/smppsxaffinity02/init.c index 7916e60ece..ad98da4ec1 100644 --- a/testsuites/smptests/smppsxaffinity02/init.c +++ b/testsuites/smptests/smppsxaffinity02/init.c @@ -121,7 +121,7 @@ void Validate_affinity(void ) rtems_test_assert( !sc ); /* Get the number of processors that we are using. */ - cpu_count = rtems_smp_get_processor_count(); + cpu_count = rtems_get_processor_count(); /* Fill the remaining cpus with med priority tasks */ puts( "Init - Create Medium priority tasks"); diff --git a/testsuites/smptests/smppsxsignal01/init.c b/testsuites/smptests/smppsxsignal01/init.c index 495af063a7..61eaec1667 100644 --- a/testsuites/smptests/smppsxsignal01/init.c +++ b/testsuites/smptests/smppsxsignal01/init.c @@ -165,7 +165,7 @@ static void *POSIX_Init(void *arg) { TEST_BEGIN(); - if (rtems_smp_get_processor_count() >= 2) { + if (rtems_get_processor_count() >= 2) { test(); } diff --git a/testsuites/smptests/smpscheduler01/init.c b/testsuites/smptests/smpscheduler01/init.c index a0d37602b3..10ac735ca2 100644 --- a/testsuites/smptests/smpscheduler01/init.c +++ b/testsuites/smptests/smpscheduler01/init.c @@ -69,7 +69,7 @@ static void task(rtems_task_argument arg) static bool is_per_cpu_state_ok(void) { bool ok = true; - uint32_t n = rtems_smp_get_processor_count(); + uint32_t n = rtems_get_processor_count(); uint32_t i; for (i = 0; i < n; ++i) { diff --git a/testsuites/smptests/smpsignal01/init.c b/testsuites/smptests/smpsignal01/init.c index d5d31d5a06..1aaa70090a 100644 --- a/testsuites/smptests/smpsignal01/init.c +++ b/testsuites/smptests/smpsignal01/init.c @@ -166,7 +166,7 @@ static void Init(rtems_task_argument arg) { TEST_BEGIN(); - if (rtems_smp_get_processor_count() >= 2) { + if (rtems_get_processor_count() >= 2) { test(); } diff --git a/testsuites/smptests/smpswitchextension01/init.c b/testsuites/smptests/smpswitchextension01/init.c index 017ff97e9d..eda8a9cfde 100644 --- a/testsuites/smptests/smpswitchextension01/init.c +++ b/testsuites/smptests/smpswitchextension01/init.c @@ -225,7 +225,7 @@ static void Init(rtems_task_argument arg) { TEST_BEGIN(); - if (rtems_smp_get_processor_count() >= 2) { + if (rtems_get_processor_count() >= 2) { test(); } diff --git a/testsuites/smptests/smpthreadlife01/init.c b/testsuites/smptests/smpthreadlife01/init.c index 8ff5ea1c50..38b054f41c 100644 --- a/testsuites/smptests/smpthreadlife01/init.c +++ b/testsuites/smptests/smpthreadlife01/init.c @@ -298,7 +298,7 @@ static void Init(rtems_task_argument arg) { TEST_BEGIN(); - if (rtems_smp_get_processor_count() >= CPU_COUNT) { + if (rtems_get_processor_count() >= CPU_COUNT) { test_restart(); test_delete(); test_set_life_protection(); |