summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sppercpudata01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-05 08:16:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-09 08:06:46 +0200
commitf9219db2a95c8285d1be22092572b4236bfe6488 (patch)
treec168ac7fdf7458cea6d7146584b2adb38d47f6a1 /testsuites/sptests/sppercpudata01
parentrtems: Add rtems_scheduler_get_processor() (diff)
downloadrtems-f9219db2a95c8285d1be22092572b4236bfe6488.tar.bz2
rtems: Add rtems_scheduler_get_processor_maximum()
Add rtems_scheduler_get_processor_maximum() as a replacement for rtems_get_processor_count(). The rtems_get_processor_count() is a bit orphaned. Adopt it by the Scheduler Manager. The count is also misleading, since the processor set may have gaps and the actual count of online processors may be less than the value returned by rtems_get_processor_count(). Update #3732.
Diffstat (limited to 'testsuites/sptests/sppercpudata01')
-rw-r--r--testsuites/sptests/sppercpudata01/init.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/testsuites/sptests/sppercpudata01/init.c b/testsuites/sptests/sppercpudata01/init.c
index 94f5185d4e..eec4883e92 100644
--- a/testsuites/sptests/sppercpudata01/init.c
+++ b/testsuites/sptests/sppercpudata01/init.c
@@ -68,7 +68,11 @@ static void test_initial_values(void)
{
uint32_t cpu_index;
- for (cpu_index = 0; cpu_index < rtems_get_processor_count(); ++cpu_index) {
+ for (
+ cpu_index = 0;
+ cpu_index < rtems_scheduler_get_processor_maximum();
+ ++cpu_index
+ ) {
Per_CPU_Control *cpu;
unsigned char *c;
unsigned short *s;
@@ -137,7 +141,11 @@ static void set_unique_values(unsigned int v)
{
uint32_t cpu_index;
- for (cpu_index = 0; cpu_index < rtems_get_processor_count(); ++cpu_index) {
+ for (
+ cpu_index = 0;
+ cpu_index < rtems_scheduler_get_processor_maximum();
+ ++cpu_index
+ ) {
Per_CPU_Control *cpu;
unsigned char *c;
unsigned short *s;
@@ -196,7 +204,11 @@ static void test_unique_values(unsigned int v)
{
uint32_t cpu_index;
- for (cpu_index = 0; cpu_index < rtems_get_processor_count(); ++cpu_index) {
+ for (
+ cpu_index = 0;
+ cpu_index < rtems_scheduler_get_processor_maximum();
+ ++cpu_index
+ ) {
Per_CPU_Control *cpu;
unsigned char *c;
unsigned short *s;