From a00dff42cfdf201abe15829baeeb2b6341a0426b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 12 Dec 2019 06:37:01 +0100 Subject: rtems: Add and use rtems_object_get_local_node() Update #3841. --- testsuites/mptests/mp08/initimpl.h | 6 +++--- testsuites/mptests/mp08/task1.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'testsuites/mptests/mp08') diff --git a/testsuites/mptests/mp08/initimpl.h b/testsuites/mptests/mp08/initimpl.h index 859b3114bf..6a131c9705 100644 --- a/testsuites/mptests/mp08/initimpl.h +++ b/testsuites/mptests/mp08/initimpl.h @@ -34,7 +34,7 @@ rtems_task Init( printf( "\n\n*** TEST 8 -- NODE %" PRIu32 " ***\n", - Multiprocessing_configuration.node + rtems_object_get_local_node() ); Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' ); @@ -42,7 +42,7 @@ rtems_task Init( Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', '\0' ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { puts( "Creating Sempahore (Global)" ); status = rtems_semaphore_create( Semaphore_name[ 1 ], @@ -56,7 +56,7 @@ rtems_task Init( puts( "Creating Test_task (Global)" ); status = rtems_task_create( - Task_name[ Multiprocessing_configuration.node ], + Task_name[ rtems_object_get_local_node() ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_TIMESLICE, diff --git a/testsuites/mptests/mp08/task1.c b/testsuites/mptests/mp08/task1.c index 35d67e649a..3e914db227 100644 --- a/testsuites/mptests/mp08/task1.c +++ b/testsuites/mptests/mp08/task1.c @@ -39,7 +39,7 @@ rtems_task Test_task( ); } while ( !rtems_is_status_successful( status ) ); - if ( Multiprocessing_configuration.node == 2 ) { + if ( rtems_object_get_local_node() == 2 ) { status = rtems_semaphore_delete( Semaphore_id[ 1 ] ); fatal_directive_status( status, @@ -70,7 +70,7 @@ rtems_task Test_task( rtems_test_exit( 0 ); } - if ( Multiprocessing_configuration.node == 1 && ++count == 1000 ) { + if ( rtems_object_get_local_node() == 1 && ++count == 1000 ) { status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); -- cgit v1.2.3