summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smp02
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/smptests/smp02')
-rw-r--r--testsuites/smptests/smp02/init.c7
-rw-r--r--testsuites/smptests/smp02/system.h2
-rw-r--r--testsuites/smptests/smp02/tasks.c6
3 files changed, 8 insertions, 7 deletions
diff --git a/testsuites/smptests/smp02/init.c b/testsuites/smptests/smp02/init.c
index a5ad24bdf5..d053b31377 100644
--- a/testsuites/smptests/smp02/init.c
+++ b/testsuites/smptests/smp02/init.c
@@ -15,6 +15,7 @@
#include "system.h"
#include <stdio.h>
+#include <inttypes.h>
rtems_task Init(
rtems_task_argument argument
@@ -22,7 +23,7 @@ rtems_task Init(
{
int i;
char ch;
- int cpu_num;
+ uint32_t cpu_num;
rtems_id id;
rtems_status_code status;
char str[80];
@@ -59,8 +60,8 @@ rtems_task Init(
&id
);
- cpu_num = bsp_smp_processor_id();
- locked_printf(" CPU %d start task TA%c\n", cpu_num, ch);
+ cpu_num = rtems_smp_get_current_processor();
+ locked_printf(" CPU %" PRIu32 " start task TA%c\n", cpu_num, ch);
status = rtems_task_start( id, Test_task, i+1 );
directive_failed( status, str );
}
diff --git a/testsuites/smptests/smp02/system.h b/testsuites/smptests/smp02/system.h
index 269c7c0b11..ebe243fd9d 100644
--- a/testsuites/smptests/smp02/system.h
+++ b/testsuites/smptests/smp02/system.h
@@ -50,7 +50,7 @@ rtems_task Test_task(
typedef struct {
bool IsLocked;
- int cpu_num;
+ uint32_t cpu_num;
uint32_t task_index;
} Log_t;
diff --git a/testsuites/smptests/smp02/tasks.c b/testsuites/smptests/smp02/tasks.c
index e3ac062e45..4e7a6255c0 100644
--- a/testsuites/smptests/smp02/tasks.c
+++ b/testsuites/smptests/smp02/tasks.c
@@ -21,7 +21,7 @@ void Loop(void) {
void LogSemaphore(
bool obtained,
- int cpu_num,
+ uint32_t cpu_num,
uint32_t task_index
){
if (Log_index < LOG_SIZE) {
@@ -37,10 +37,10 @@ rtems_task Test_task(
rtems_task_argument task_index
)
{
- int cpu_num;
+ uint32_t cpu_num;
rtems_status_code sc;
- cpu_num = bsp_smp_processor_id();
+ cpu_num = rtems_smp_get_current_processor();
do {