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/mp01/initimpl.h | 4 ++-- testsuites/mptests/mp03/initimpl.h | 4 ++-- testsuites/mptests/mp03/task1.c | 6 +++--- testsuites/mptests/mp04/initimpl.h | 6 +++--- testsuites/mptests/mp04/task1.c | 6 ++---- testsuites/mptests/mp05/initimpl.h | 4 ++-- testsuites/mptests/mp05/task1.c | 4 ++-- testsuites/mptests/mp06/initimpl.h | 4 ++-- testsuites/mptests/mp06/task1.c | 10 +++++----- testsuites/mptests/mp07/initimpl.h | 4 ++-- testsuites/mptests/mp07/task1.c | 4 ++-- testsuites/mptests/mp08/initimpl.h | 6 +++--- testsuites/mptests/mp08/task1.c | 4 ++-- testsuites/mptests/mp09/initimpl.h | 6 +++--- testsuites/mptests/mp09/task1.c | 2 +- testsuites/mptests/mp10/initimpl.h | 4 ++-- testsuites/mptests/mp11/initimpl.h | 4 ++-- testsuites/mptests/mp12/initimpl.h | 4 ++-- testsuites/mptests/mp13/initimpl.h | 6 +++--- testsuites/mptests/mp13/task1.c | 2 +- testsuites/mptests/mp13/task2.c | 2 +- testsuites/mptests/mp14/evtask1.c | 6 ++---- testsuites/mptests/mp14/initimpl.h | 12 ++++++------ testsuites/mptests/mp14/msgtask1.c | 4 ++-- testsuites/mptests/mp14/pttask1.c | 4 +--- testsuites/mptests/mp14/smtask1.c | 4 +--- testsuites/mptests/mp14/system.h | 2 -- 27 files changed, 59 insertions(+), 69 deletions(-) (limited to 'testsuites/mptests') diff --git a/testsuites/mptests/mp01/initimpl.h b/testsuites/mptests/mp01/initimpl.h index d5017af643..e9214c09c1 100644 --- a/testsuites/mptests/mp01/initimpl.h +++ b/testsuites/mptests/mp01/initimpl.h @@ -36,10 +36,10 @@ rtems_task Init( printf( "\n\n*** TEST 1 -- NODE %" PRIu32 " ***\n", - Multiprocessing_configuration.node + rtems_object_get_local_node() ); - if ( Multiprocessing_configuration.node != 1 ) c = 'S'; + if ( rtems_object_get_local_node() != 1 ) c = 'S'; else c = 'M'; Task_name[ 1 ] = rtems_build_name( c, 'A', '1', ' ' ); diff --git a/testsuites/mptests/mp03/initimpl.h b/testsuites/mptests/mp03/initimpl.h index 533d32175a..ef4879d09c 100644 --- a/testsuites/mptests/mp03/initimpl.h +++ b/testsuites/mptests/mp03/initimpl.h @@ -34,7 +34,7 @@ rtems_task Init( printf( "\n\n*** TEST 3 -- 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( 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_NO_PREEMPT, diff --git a/testsuites/mptests/mp03/task1.c b/testsuites/mptests/mp03/task1.c index 5fdda4d0f2..48682e032c 100644 --- a/testsuites/mptests/mp03/task1.c +++ b/testsuites/mptests/mp03/task1.c @@ -20,7 +20,7 @@ static void Test_Task_Support( rtems_event_set events; rtems_status_code status; - if ( Multiprocessing_configuration.node == node ) { + if ( rtems_object_get_local_node() == node ) { for ( ; ; ) { @@ -98,7 +98,7 @@ rtems_task Test_task( directive_failed( status, "rtems_task_ident" ); puts( "Getting TID of remote task" ); - remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1; + remote_node = (rtems_object_get_local_node() == 1) ? 2 : 1; printf( "Remote task's name is : " ); put_name( Task_name[ remote_node ], TRUE ); @@ -130,7 +130,7 @@ rtems_task Test_task( ); directive_failed( status, "rtems_timer_fire_after" ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { status = rtems_task_wake_after( 2 * rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); } diff --git a/testsuites/mptests/mp04/initimpl.h b/testsuites/mptests/mp04/initimpl.h index 3e3d8cd32f..4598944e00 100644 --- a/testsuites/mptests/mp04/initimpl.h +++ b/testsuites/mptests/mp04/initimpl.h @@ -34,7 +34,7 @@ rtems_task Init( printf( "\n\n*** TEST 4 -- NODE %" PRId32 " ***\n", - Multiprocessing_configuration.node + rtems_object_get_local_node() ); Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' ); @@ -42,8 +42,8 @@ rtems_task Init( puts( "Creating Test_task (Global)" ); status = rtems_task_create( - Task_name[ Multiprocessing_configuration.node ], - Multiprocessing_configuration.node, + Task_name[ rtems_object_get_local_node() ], + rtems_object_get_local_node(), RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_GLOBAL, diff --git a/testsuites/mptests/mp04/task1.c b/testsuites/mptests/mp04/task1.c index 242b98c6f9..878effd237 100644 --- a/testsuites/mptests/mp04/task1.c +++ b/testsuites/mptests/mp04/task1.c @@ -22,8 +22,6 @@ #include "system.h" #include "tmacros.h" -extern rtems_multiprocessing_table Multiprocessing_configuration; - rtems_task Test_task( rtems_task_argument argument ) @@ -39,7 +37,7 @@ rtems_task Test_task( directive_failed( status, "rtems_task_ident" ); puts( "Getting TID of remote task" ); - remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1; + remote_node = (rtems_object_get_local_node() == 1) ? 2 : 1; puts_nocr( "Remote task's name is : " ); put_name( Task_name[ remote_node ], TRUE ); @@ -55,7 +53,7 @@ rtems_task Test_task( status = rtems_task_set_priority( remote_tid, - Multiprocessing_configuration.node, + rtems_object_get_local_node(), &previous_priority ); directive_failed( status, "rtems_task_set_priority" ); diff --git a/testsuites/mptests/mp05/initimpl.h b/testsuites/mptests/mp05/initimpl.h index a2d4002fde..40b1ea6d9e 100644 --- a/testsuites/mptests/mp05/initimpl.h +++ b/testsuites/mptests/mp05/initimpl.h @@ -34,7 +34,7 @@ rtems_task Init( printf( "\n\n*** TEST 5 -- 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( 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 * 2, RTEMS_TIMESLICE, diff --git a/testsuites/mptests/mp05/task1.c b/testsuites/mptests/mp05/task1.c index 171e9a2d21..17a72c4278 100644 --- a/testsuites/mptests/mp05/task1.c +++ b/testsuites/mptests/mp05/task1.c @@ -50,7 +50,7 @@ rtems_task Test_task( status = rtems_signal_catch( Process_asr, RTEMS_NO_ASR|RTEMS_NO_PREEMPT ); directive_failed( status, "rtems_signal_catch" ); - if (Multiprocessing_configuration.node == 1) { + if (rtems_object_get_local_node() == 1) { remote_node = 2; remote_signal = RTEMS_SIGNAL_18; expected_signal = RTEMS_SIGNAL_17; @@ -81,7 +81,7 @@ rtems_task Test_task( ); directive_failed( status, "rtems_timer_fire_after" ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { puts( "Sending signal to remote task" ); do { status = rtems_signal_send( remote_tid, remote_signal ); diff --git a/testsuites/mptests/mp06/initimpl.h b/testsuites/mptests/mp06/initimpl.h index 5598d328b0..1155e49f46 100644 --- a/testsuites/mptests/mp06/initimpl.h +++ b/testsuites/mptests/mp06/initimpl.h @@ -34,7 +34,7 @@ rtems_task Init( printf( "\n\n*** TEST 6 -- NODE %" PRId32 " ***\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( 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_DEFAULT_MODES, diff --git a/testsuites/mptests/mp06/task1.c b/testsuites/mptests/mp06/task1.c index 3e8920f4c3..93b04924c6 100644 --- a/testsuites/mptests/mp06/task1.c +++ b/testsuites/mptests/mp06/task1.c @@ -80,7 +80,7 @@ rtems_task Test_task( Stop_Test = false; - remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1; + remote_node = (rtems_object_get_local_node() == 1) ? 2 : 1; puts_nocr( "Remote task's name is : " ); put_name( Task_name[ remote_node ], TRUE ); @@ -94,7 +94,7 @@ rtems_task Test_task( } while ( status != RTEMS_SUCCESSFUL ); directive_failed( status, "rtems_task_ident FAILED!!" ); - if ( Multiprocessing_configuration.node == 1 ) + if ( rtems_object_get_local_node() == 1 ) puts( "Sending events to remote task" ); else puts( "Receiving events from remote task" ); @@ -115,7 +115,7 @@ rtems_task Test_task( event_for_this_iteration = Event_set_table[ count % 32 ]; - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { status = rtems_event_send( remote_tid, event_for_this_iteration ); directive_failed( status, "rtems_event_send" ); @@ -129,7 +129,7 @@ rtems_task Test_task( &event_out ); if ( rtems_are_statuses_equal( status, RTEMS_TIMEOUT ) ) { - if ( Multiprocessing_configuration.node == 2 ) + if ( rtems_object_get_local_node() == 2 ) puts( "\nCorrect behavior if the other node exitted." ); else puts( "\nERROR... node 1 died" ); @@ -146,7 +146,7 @@ rtems_task Test_task( putchar( '\n' ); - if ( Multiprocessing_configuration.node == 2 ) { + if ( rtems_object_get_local_node() == 2 ) { /* Flush events */ puts( "Flushing RTEMS_EVENT_16" ); (void) rtems_event_receive(RTEMS_EVENT_16, RTEMS_NO_WAIT, 0, &event_out); diff --git a/testsuites/mptests/mp07/initimpl.h b/testsuites/mptests/mp07/initimpl.h index 1aa51a3d79..de54663773 100644 --- a/testsuites/mptests/mp07/initimpl.h +++ b/testsuites/mptests/mp07/initimpl.h @@ -34,7 +34,7 @@ rtems_task Init( printf( "\n\n*** TEST 7 -- NODE %" PRId32 " ***\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( 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/mp07/task1.c b/testsuites/mptests/mp07/task1.c index 7902996835..64db8b05b9 100644 --- a/testsuites/mptests/mp07/task1.c +++ b/testsuites/mptests/mp07/task1.c @@ -45,7 +45,7 @@ rtems_task Test_task( Stop_Test = false; - remote_node = (Multiprocessing_configuration.node == 1) ? 2 : 1; + remote_node = (rtems_object_get_local_node() == 1) ? 2 : 1; puts_nocr( "Remote task's name is : " ); put_name( Task_name[ remote_node ], TRUE ); @@ -58,7 +58,7 @@ rtems_task Test_task( ); } while ( !rtems_is_status_successful( status ) ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { puts( "Sending first event to remote task" ); status = rtems_event_send( remote_tid, RTEMS_EVENT_16 ); directive_failed( status, "rtems_event_send" ); 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" ); diff --git a/testsuites/mptests/mp09/initimpl.h b/testsuites/mptests/mp09/initimpl.h index 97237c34f1..ff18c514a2 100644 --- a/testsuites/mptests/mp09/initimpl.h +++ b/testsuites/mptests/mp09/initimpl.h @@ -34,7 +34,7 @@ rtems_task Init( printf( "\n\n*** TEST 9 -- NODE %" PRId32 " ***\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( Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { puts( "Creating Message Queue (Global)" ); status = rtems_message_queue_create( Queue_name[ 1 ], @@ -56,7 +56,7 @@ rtems_task Init( puts( "Creating Test_task (local)" ); 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/mp09/task1.c b/testsuites/mptests/mp09/task1.c index d971f1b503..dc78552994 100644 --- a/testsuites/mptests/mp09/task1.c +++ b/testsuites/mptests/mp09/task1.c @@ -49,7 +49,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_message_queue_delete( Queue_id[ 1 ] ); fatal_directive_status( status, diff --git a/testsuites/mptests/mp10/initimpl.h b/testsuites/mptests/mp10/initimpl.h index b5c5a200f4..5e09662119 100644 --- a/testsuites/mptests/mp10/initimpl.h +++ b/testsuites/mptests/mp10/initimpl.h @@ -40,7 +40,7 @@ rtems_task Init( printf( "\n\n*** TEST 10 -- NODE %" PRIu32 " ***\n", - Multiprocessing_configuration.node + rtems_object_get_local_node() ); Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' ); @@ -51,7 +51,7 @@ rtems_task Init( Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { puts( "Creating Message Queue (Global)" ); status = rtems_message_queue_create( Queue_name[ 1 ], diff --git a/testsuites/mptests/mp11/initimpl.h b/testsuites/mptests/mp11/initimpl.h index e44b151597..2f0a97a700 100644 --- a/testsuites/mptests/mp11/initimpl.h +++ b/testsuites/mptests/mp11/initimpl.h @@ -40,7 +40,7 @@ rtems_task Init( printf( "\n\n*** TEST 11 -- NODE %" PRIu32 " ***\n", - Multiprocessing_configuration.node + rtems_object_get_local_node() ); Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' ); @@ -50,7 +50,7 @@ rtems_task Init( Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { puts( "Attempting to create Test_task (Global)" ); status = rtems_task_create( Task_name[ 1 ], diff --git a/testsuites/mptests/mp12/initimpl.h b/testsuites/mptests/mp12/initimpl.h index 7486e664c6..6eb38a904c 100644 --- a/testsuites/mptests/mp12/initimpl.h +++ b/testsuites/mptests/mp12/initimpl.h @@ -42,7 +42,7 @@ rtems_task Init( printf( "\n\n*** TEST 12 -- NODE %" PRId32 " ***\n", - Multiprocessing_configuration.node + rtems_object_get_local_node() ); Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' ); @@ -52,7 +52,7 @@ rtems_task Init( puts( "Got to initialization task" ); - if ( Multiprocessing_configuration.node == 2 ) { + if ( rtems_object_get_local_node() == 2 ) { status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); diff --git a/testsuites/mptests/mp13/initimpl.h b/testsuites/mptests/mp13/initimpl.h index af5456919b..c6ac82ea9e 100644 --- a/testsuites/mptests/mp13/initimpl.h +++ b/testsuites/mptests/mp13/initimpl.h @@ -34,7 +34,7 @@ rtems_task Init( printf( "\n\n*** TEST 13 -- NODE %" PRId32 " ***\n", - Multiprocessing_configuration.node + rtems_object_get_local_node() ); Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' ); @@ -44,7 +44,7 @@ rtems_task Init( Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { puts( "Creating Message Queue (Global)" ); status = rtems_message_queue_create( Queue_name[ 1 ], @@ -103,7 +103,7 @@ rtems_task Init( status = rtems_task_start( Task_id[ 2 ], Test_task2, 0 ); directive_failed( status, "rtems_task_start" ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { status = rtems_task_wake_after( 5 * rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); diff --git a/testsuites/mptests/mp13/task1.c b/testsuites/mptests/mp13/task1.c index 563c9f5c17..127c4c8e86 100644 --- a/testsuites/mptests/mp13/task1.c +++ b/testsuites/mptests/mp13/task1.c @@ -41,7 +41,7 @@ rtems_task Test_task1( ); } while ( !rtems_is_status_successful( status ) ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { puts( "Receiving message ..." ); status = rtems_message_queue_receive( Queue_id[ 1 ], diff --git a/testsuites/mptests/mp13/task2.c b/testsuites/mptests/mp13/task2.c index 30466c5265..0b7b5db71d 100644 --- a/testsuites/mptests/mp13/task2.c +++ b/testsuites/mptests/mp13/task2.c @@ -40,7 +40,7 @@ rtems_task Test_task2( directive_failed( status, "rtems_semaphore_ident" ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); diff --git a/testsuites/mptests/mp14/evtask1.c b/testsuites/mptests/mp14/evtask1.c index 871b0cc881..c65853967f 100644 --- a/testsuites/mptests/mp14/evtask1.c +++ b/testsuites/mptests/mp14/evtask1.c @@ -23,8 +23,6 @@ #include "system.h" -extern rtems_multiprocessing_table Multiprocessing_configuration; - rtems_task Test_task( rtems_task_argument argument ) @@ -35,7 +33,7 @@ rtems_task Test_task( rtems_id remote_tid; rtems_event_set event_out; - remote_node = ((Multiprocessing_configuration.node == 1) ? 2 : 1); + remote_node = ((rtems_object_get_local_node() == 1) ? 2 : 1); puts( "About to go to sleep!" ); status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); @@ -59,7 +57,7 @@ rtems_task Test_task( rtems_task_wake_after(2); } - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { puts( "Sending events to remote task" ); while ( Stop_Test == false ) { for ( count=EVENT_TASK_DOT_COUNT; Stop_Test == false && count; count-- ) { diff --git a/testsuites/mptests/mp14/initimpl.h b/testsuites/mptests/mp14/initimpl.h index 3591e271f8..1dbfb35c22 100644 --- a/testsuites/mptests/mp14/initimpl.h +++ b/testsuites/mptests/mp14/initimpl.h @@ -51,7 +51,7 @@ rtems_task Init( printf( "\n\n*** TEST 14 -- NODE %" PRId32 " ***\n", - Multiprocessing_configuration.node + rtems_object_get_local_node() ); Stop_Test = false; @@ -90,7 +90,7 @@ rtems_task Init( Timer_name[ 1 ] = rtems_build_name( 'T', 'M', 'R', ' ' ); - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { puts( "Creating Semaphore (Global)" ); status = rtems_semaphore_create( Semaphore_name[ 1 ], @@ -125,7 +125,7 @@ rtems_task Init( puts( "Creating Event task (Global)" ); status = rtems_task_create( - Task_name[ Multiprocessing_configuration.node ], + Task_name[ rtems_object_get_local_node() ], 2, RTEMS_MINIMUM_STACK_SIZE, RTEMS_TIMESLICE, @@ -140,7 +140,7 @@ rtems_task Init( puts( "Creating Semaphore task (Global)" ); status = rtems_task_create( - Semaphore_task_name[ Multiprocessing_configuration.node ], + Semaphore_task_name[ rtems_object_get_local_node() ], 2, RTEMS_MINIMUM_STACK_SIZE, RTEMS_TIMESLICE, @@ -155,7 +155,7 @@ rtems_task Init( puts( "Creating Message Queue task (Global)" ); status = rtems_task_create( - Queue_task_name[ Multiprocessing_configuration.node ], + Queue_task_name[ rtems_object_get_local_node() ], 2, RTEMS_MINIMUM_STACK_SIZE, RTEMS_TIMESLICE, @@ -171,7 +171,7 @@ rtems_task Init( puts( "Creating Partition task (Global)" ); status = rtems_task_create( - Partition_task_name[ Multiprocessing_configuration.node ], + Partition_task_name[ rtems_object_get_local_node() ], 2, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_TIMESLICE, diff --git a/testsuites/mptests/mp14/msgtask1.c b/testsuites/mptests/mp14/msgtask1.c index c7e3d13c40..3bbeb7ecc2 100644 --- a/testsuites/mptests/mp14/msgtask1.c +++ b/testsuites/mptests/mp14/msgtask1.c @@ -53,7 +53,7 @@ rtems_task Message_queue_task( rtems_task_wake_after(2); } - if ( Multiprocessing_configuration.node == 1 ) { + if ( rtems_object_get_local_node() == 1 ) { status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])Msg_buffer[ index ], @@ -94,7 +94,7 @@ rtems_task Message_queue_task( directive_failed( status, "rtems_message_queue_send" ); if (Stop_Test == false) - if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) { + if ( rtems_object_get_local_node() == 1 && --yield_count == 0 ) { status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); directive_failed( status, "rtems_task_wake_after" ); diff --git a/testsuites/mptests/mp14/pttask1.c b/testsuites/mptests/mp14/pttask1.c index b93938df4f..409a3ff3ca 100644 --- a/testsuites/mptests/mp14/pttask1.c +++ b/testsuites/mptests/mp14/pttask1.c @@ -22,8 +22,6 @@ #include "system.h" -extern rtems_multiprocessing_table Multiprocessing_configuration; - rtems_task Partition_task( rtems_task_argument argument ) @@ -59,7 +57,7 @@ rtems_task Partition_task( directive_failed( status, "rtems_partition_return_buffer" ); if (Stop_Test == false) - if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) { + if ( rtems_object_get_local_node() == 1 && --yield_count == 0 ) { status = rtems_task_wake_after( 1 ); directive_failed( status, "rtems_task_wake_after" ); yield_count = 100; diff --git a/testsuites/mptests/mp14/smtask1.c b/testsuites/mptests/mp14/smtask1.c index 454f30b450..e4126dbf8b 100644 --- a/testsuites/mptests/mp14/smtask1.c +++ b/testsuites/mptests/mp14/smtask1.c @@ -21,8 +21,6 @@ #include "system.h" -extern rtems_multiprocessing_table Multiprocessing_configuration; - rtems_task Semaphore_task( rtems_task_argument argument ) @@ -60,7 +58,7 @@ rtems_task Semaphore_task( directive_failed( status, "rtems_semaphore_release" ); if ( Stop_Test == false ) - if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) { + if ( rtems_object_get_local_node() == 1 && --yield_count == 0 ) { status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); directive_failed( status, "rtems_task_wake_after" ); diff --git a/testsuites/mptests/mp14/system.h b/testsuites/mptests/mp14/system.h index 9f53601848..3797f0e559 100644 --- a/testsuites/mptests/mp14/system.h +++ b/testsuites/mptests/mp14/system.h @@ -104,8 +104,6 @@ TEST_EXTERN rtems_name Timer_name[ 4 ]; /* event timer names */ TEST_EXTERN uint32_t Msg_buffer[ 4 ][ 4 ]; -extern rtems_multiprocessing_table Multiprocessing_configuration; - TEST_EXTERN volatile bool Stop_Test; TEST_EXTERN rtems_id timer_id; -- cgit v1.2.3