From 23848bbd80f00aa8e271322f19871c0ba1366803 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 1 Oct 2007 22:58:09 +0000 Subject: 2007-10-01 Joel Sherrill * mptests/mp01/mptest.adb, mptests/mp01/mptest.ads, mptests/mp01/node1/Makefile.am, mptests/mp02/mptest.adb, mptests/mp02/mptest.ads, mptests/mp03/mptest.adb, mptests/mp03/mptest.ads, mptests/mp04/mptest.adb, mptests/mp04/mptest.ads, mptests/mp05/mptest.adb, mptests/mp05/mptest.ads, mptests/mp06/mptest.adb, mptests/mp06/mptest.ads, mptests/mp07/mptest.adb, mptests/mp07/mptest.ads, mptests/mp08/mptest.adb, mptests/mp08/mptest.ads, mptests/mp09/mptest.adb, mptests/mp09/mptest.ads, mptests/mp10/mptest.adb, mptests/mp10/mptest.ads, mptests/mp11/mptest.adb, mptests/mp11/mptest.ads, mptests/mp12/mptest.adb, mptests/mp12/mptest.ads, mptests/mp13/mptest.adb, mptests/mp13/mptest.ads, mptests/mp14/mptest.adb, mptests/mp14/mptest.ads, support/init.c, support/test_support.adb, support/test_support.ads: Most of single processor Ada tests now build. Some run. --- c/src/ada-tests/ChangeLog | 20 +++++ c/src/ada-tests/mptests/mp01/mptest.adb | 8 +- c/src/ada-tests/mptests/mp01/mptest.ads | 103 ----------------------- c/src/ada-tests/mptests/mp01/node1/Makefile.am | 2 - c/src/ada-tests/mptests/mp02/mptest.adb | 8 +- c/src/ada-tests/mptests/mp02/mptest.ads | 103 ----------------------- c/src/ada-tests/mptests/mp03/mptest.adb | 16 ++-- c/src/ada-tests/mptests/mp03/mptest.ads | 103 ----------------------- c/src/ada-tests/mptests/mp04/mptest.adb | 12 ++- c/src/ada-tests/mptests/mp04/mptest.ads | 103 ----------------------- c/src/ada-tests/mptests/mp05/mptest.adb | 12 ++- c/src/ada-tests/mptests/mp05/mptest.ads | 107 +----------------------- c/src/ada-tests/mptests/mp06/mptest.adb | 20 +++-- c/src/ada-tests/mptests/mp06/mptest.ads | 105 +----------------------- c/src/ada-tests/mptests/mp07/mptest.adb | 13 ++- c/src/ada-tests/mptests/mp07/mptest.ads | 105 +----------------------- c/src/ada-tests/mptests/mp08/mptest.adb | 14 ++-- c/src/ada-tests/mptests/mp08/mptest.ads | 103 ----------------------- c/src/ada-tests/mptests/mp09/mptest.adb | 12 ++- c/src/ada-tests/mptests/mp09/mptest.ads | 103 ----------------------- c/src/ada-tests/mptests/mp10/mptest.adb | 6 +- c/src/ada-tests/mptests/mp10/mptest.ads | 103 ----------------------- c/src/ada-tests/mptests/mp11/mptest.adb | 6 +- c/src/ada-tests/mptests/mp11/mptest.ads | 103 ----------------------- c/src/ada-tests/mptests/mp12/mptest.adb | 6 +- c/src/ada-tests/mptests/mp12/mptest.ads | 103 ----------------------- c/src/ada-tests/mptests/mp13/mptest.adb | 12 ++- c/src/ada-tests/mptests/mp13/mptest.ads | 103 ----------------------- c/src/ada-tests/mptests/mp14/mptest.adb | 33 ++++---- c/src/ada-tests/mptests/mp14/mptest.ads | 108 +------------------------ c/src/ada-tests/support/init.c | 18 +++++ c/src/ada-tests/support/test_support.adb | 34 +++++++- c/src/ada-tests/support/test_support.ads | 17 +++- 33 files changed, 163 insertions(+), 1561 deletions(-) (limited to 'c/src/ada-tests') diff --git a/c/src/ada-tests/ChangeLog b/c/src/ada-tests/ChangeLog index f68599c765..76f2cae420 100644 --- a/c/src/ada-tests/ChangeLog +++ b/c/src/ada-tests/ChangeLog @@ -1,3 +1,23 @@ +2007-10-01 Joel Sherrill + + * mptests/mp01/mptest.adb, mptests/mp01/mptest.ads, + mptests/mp01/node1/Makefile.am, mptests/mp02/mptest.adb, + mptests/mp02/mptest.ads, mptests/mp03/mptest.adb, + mptests/mp03/mptest.ads, mptests/mp04/mptest.adb, + mptests/mp04/mptest.ads, mptests/mp05/mptest.adb, + mptests/mp05/mptest.ads, mptests/mp06/mptest.adb, + mptests/mp06/mptest.ads, mptests/mp07/mptest.adb, + mptests/mp07/mptest.ads, mptests/mp08/mptest.adb, + mptests/mp08/mptest.ads, mptests/mp09/mptest.adb, + mptests/mp09/mptest.ads, mptests/mp10/mptest.adb, + mptests/mp10/mptest.ads, mptests/mp11/mptest.adb, + mptests/mp11/mptest.ads, mptests/mp12/mptest.adb, + mptests/mp12/mptest.ads, mptests/mp13/mptest.adb, + mptests/mp13/mptest.ads, mptests/mp14/mptest.adb, + mptests/mp14/mptest.ads, support/init.c, support/test_support.adb, + support/test_support.ads: Most of single processor Ada tests now + build. Some run. + 2007-05-23 Joel Sherrill * support/init.c: Spacing cleanup. diff --git a/c/src/ada-tests/mptests/mp01/mptest.adb b/c/src/ada-tests/mptests/mp01/mptest.adb index 3e105f5aa4..71787c65dc 100644 --- a/c/src/ada-tests/mptests/mp01/mptest.adb +++ b/c/src/ada-tests/mptests/mp01/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -38,7 +36,7 @@ package body MPTEST is procedure INIT ( ARGUMENT : in RTEMS.TASK_ARGUMENT ) is - C : RTEMS.CHARACTER; + C : CHARACTER; TIME : RTEMS.TIME_OF_DAY; STATUS : RTEMS.STATUS_CODES; begin @@ -46,12 +44,12 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 1 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE /= 1 then + if TEST_SUPPORT.NODE /= 1 then C := 'S'; else C := 'M'; diff --git a/c/src/ada-tests/mptests/mp01/mptest.ads b/c/src/ada-tests/mptests/mp01/mptest.ads index a14eefa697..d6b1619cb4 100644 --- a/c/src/ada-tests/mptests/mp01/mptest.ads +++ b/c/src/ada-tests/mptests/mp01/mptest.ads @@ -56,107 +56,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.GLOBAL, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 33, -- maximum # global objects - 33 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 0, -- maximum # timers - 0, -- maximum # semaphores - 0, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp01/node1/Makefile.am b/c/src/ada-tests/mptests/mp01/node1/Makefile.am index 9d91121be5..6e12ed0e6f 100644 --- a/c/src/ada-tests/mptests/mp01/node1/Makefile.am +++ b/c/src/ada-tests/mptests/mp01/node1/Makefile.am @@ -14,8 +14,6 @@ if EXPADA noinst_PROGRAMS = node1 endif -node1_SOURCES = mptest-per_node_configuration.adb - scndir = $(rtems_ada_testsdir) dist_scn_DATA = mp01-node1.scn diff --git a/c/src/ada-tests/mptests/mp02/mptest.adb b/c/src/ada-tests/mptests/mp02/mptest.adb index 4e2b6f03ea..9a55f1c572 100644 --- a/c/src/ada-tests/mptests/mp02/mptest.adb +++ b/c/src/ada-tests/mptests/mp02/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +42,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 2 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -55,7 +53,7 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating test task (Global)" ); RTEMS.TASK_CREATE( - MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), + MPTEST.TASK_NAME( TEST_SUPPORT.NODE ), 1, 2048, RTEMS.NO_PREEMPT, @@ -97,7 +95,7 @@ package body MPTEST is RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS ); TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then REMOTE_NODE := 2; else REMOTE_NODE := 1; diff --git a/c/src/ada-tests/mptests/mp02/mptest.ads b/c/src/ada-tests/mptests/mp02/mptest.ads index ed20419f0e..493358293f 100644 --- a/c/src/ada-tests/mptests/mp02/mptest.ads +++ b/c/src/ada-tests/mptests/mp02/mptest.ads @@ -56,107 +56,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 0, -- maximum # timers - 0, -- maximum # semaphores - 0, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp03/mptest.adb b/c/src/ada-tests/mptests/mp03/mptest.adb index 51c96d5f35..7e53e840c6 100644 --- a/c/src/ada-tests/mptests/mp03/mptest.adb +++ b/c/src/ada-tests/mptests/mp03/mptest.adb @@ -1,8 +1,4 @@ -- --- MPTEST / BODY --- --- DESCRIPTION: --- -- This package is the implementation for Test 3 of the RTEMS -- Multiprocessor Test Suite. -- @@ -28,8 +24,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +38,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 3 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -54,7 +48,7 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Test_task (Global)" ); RTEMS.TASK_CREATE( - MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), + MPTEST.TASK_NAME( TEST_SUPPORT.NODE ), 1, 2048, RTEMS.NO_PREEMPT, @@ -121,7 +115,7 @@ package body MPTEST is TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" ); TEXT_IO.PUT_LINE( "Getting TID of remote task" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then MPTEST.REMOTE_NODE := 2; else MPTEST.REMOTE_NODE := 1; @@ -163,7 +157,7 @@ package body MPTEST is ); TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then + if TEST_SUPPORT.NODE = 2 then RTEMS.TASK_WAKE_AFTER( 2 * TEST_SUPPORT.TICKS_PER_SECOND, @@ -194,7 +188,7 @@ package body MPTEST is STATUS : RTEMS.STATUS_CODES; begin - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = NODE then + if TEST_SUPPORT.NODE = NODE then loop diff --git a/c/src/ada-tests/mptests/mp03/mptest.ads b/c/src/ada-tests/mptests/mp03/mptest.ads index d7013d35fd..c3a8b91993 100644 --- a/c/src/ada-tests/mptests/mp03/mptest.ads +++ b/c/src/ada-tests/mptests/mp03/mptest.ads @@ -106,107 +106,4 @@ package MPTEST is NODE : in RTEMS.UNSIGNED32 ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 1, -- maximum # timers - 0, -- maximum # semaphores - 0, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp04/mptest.adb b/c/src/ada-tests/mptests/mp04/mptest.adb index c6798fe287..78c7615926 100644 --- a/c/src/ada-tests/mptests/mp04/mptest.adb +++ b/c/src/ada-tests/mptests/mp04/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +42,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 4 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -55,8 +53,8 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Test_task (Global)" ); RTEMS.TASK_CREATE( - MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + MPTEST.TASK_NAME( TEST_SUPPORT.NODE ), + TEST_SUPPORT.NODE, 2048, RTEMS.DEFAULT_MODES, RTEMS.GLOBAL, @@ -100,7 +98,7 @@ package body MPTEST is TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" ); TEXT_IO.PUT_LINE( "Getting TID of remote task" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then MPTEST.REMOTE_NODE := 2; else MPTEST.REMOTE_NODE := 1; @@ -124,7 +122,7 @@ package body MPTEST is RTEMS.TASK_SET_PRIORITY( MPTEST.REMOTE_TID, - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, PREVIOUS_PRIORITY, STATUS ); diff --git a/c/src/ada-tests/mptests/mp04/mptest.ads b/c/src/ada-tests/mptests/mp04/mptest.ads index 5e5ea0a5ad..5fde55d835 100644 --- a/c/src/ada-tests/mptests/mp04/mptest.ads +++ b/c/src/ada-tests/mptests/mp04/mptest.ads @@ -70,107 +70,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 1, -- maximum # timers - 0, -- maximum # semaphores - 0, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp05/mptest.adb b/c/src/ada-tests/mptests/mp05/mptest.adb index 63033279a2..748f75ebc3 100644 --- a/c/src/ada-tests/mptests/mp05/mptest.adb +++ b/c/src/ada-tests/mptests/mp05/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +42,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 5 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -55,7 +53,7 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Test_task (Global)" ); RTEMS.TASK_CREATE( - MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), + MPTEST.TASK_NAME( TEST_SUPPORT.NODE ), 1, 2048, RTEMS.TIMESLICE, @@ -79,7 +77,7 @@ package body MPTEST is MPTEST.TIMER_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'M', '2', ' ' ); RTEMS.TIMER_CREATE( - MPTEST.TIMER_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), + MPTEST.TIMER_NAME( TEST_SUPPORT.NODE ), MPTEST.TIMER_ID( 1 ), STATUS ); @@ -158,7 +156,7 @@ package body MPTEST is ); TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SIGNAL_CATCH" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then MPTEST.REMOTE_NODE := 2; MPTEST.REMOTE_SIGNAL := RTEMS.SIGNAL_18; MPTEST.EXPECTED_SIGNAL := RTEMS.SIGNAL_17; @@ -194,7 +192,7 @@ package body MPTEST is ); TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Sending signal to remote task" ); loop diff --git a/c/src/ada-tests/mptests/mp05/mptest.ads b/c/src/ada-tests/mptests/mp05/mptest.ads index 411ec27f2b..c3e5470ba3 100644 --- a/c/src/ada-tests/mptests/mp05/mptest.ads +++ b/c/src/ada-tests/mptests/mp05/mptest.ads @@ -43,7 +43,7 @@ package MPTEST is -- -- This variable is set when the test should stop executing. -- - STOP_TEST : RTEMS.BOOLEAN; + STOP_TEST : BOOLEAN; -- -- This variable contains the ID of the remote task with which this @@ -77,7 +77,7 @@ package MPTEST is -- signal sets have been caught cumulative. -- - SIGNAL_CAUGHT : RTEMS.BOOLEAN; + SIGNAL_CAUGHT : BOOLEAN; SIGNAL_COUNT : RTEMS.UNSIGNED32; -- @@ -135,107 +135,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 1, -- maximum # timers - 2, -- maximum # semaphores - 0, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp06/mptest.adb b/c/src/ada-tests/mptests/mp06/mptest.adb index 04f45e0398..929256fc6f 100644 --- a/c/src/ada-tests/mptests/mp06/mptest.adb +++ b/c/src/ada-tests/mptests/mp06/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +42,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 6 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -55,8 +53,8 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Test_task (Global)" ); RTEMS.TASK_CREATE( - MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + MPTEST.TASK_NAME( TEST_SUPPORT.NODE ), + TEST_SUPPORT.NODE, 2048, RTEMS.DEFAULT_MODES, RTEMS.GLOBAL, @@ -79,7 +77,7 @@ package body MPTEST is MPTEST.TIMER_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'M', '2', ' ' ); RTEMS.TIMER_CREATE( - MPTEST.TIMER_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), + MPTEST.TIMER_NAME( TEST_SUPPORT.NODE ), MPTEST.TIMER_ID( 1 ), STATUS ); @@ -123,7 +121,7 @@ package body MPTEST is MPTEST.STOP_TEST := FALSE; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then MPTEST.REMOTE_NODE := 2; else MPTEST.REMOTE_NODE := 1; @@ -147,7 +145,7 @@ package body MPTEST is end loop; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Sending events to remote task" ); else TEXT_IO.PUT_LINE( "Receiving events from remote task" ); @@ -173,7 +171,7 @@ package body MPTEST is INTEGER( COUNT ) mod MPTEST.EVENT_SET_TABLE'LAST + 1 ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then RTEMS.EVENT_SEND( MPTEST.REMOTE_TID, @@ -195,7 +193,7 @@ package body MPTEST is if RTEMS.ARE_STATUSES_EQUAL( STATUS, RTEMS.TIMEOUT ) then TEXT_IO.NEW_LINE( 1 ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then + if TEST_SUPPORT.NODE = 2 then TEXT_IO.PUT_LINE( "Correct behavior if the other node exitted." ); @@ -227,7 +225,7 @@ package body MPTEST is TEXT_IO.NEW_LINE; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then + if TEST_SUPPORT.NODE = 2 then RTEMS.EVENT_RECEIVE( RTEMS.EVENT_16, diff --git a/c/src/ada-tests/mptests/mp06/mptest.ads b/c/src/ada-tests/mptests/mp06/mptest.ads index 03f29657d5..bdaa10cab1 100644 --- a/c/src/ada-tests/mptests/mp06/mptest.ads +++ b/c/src/ada-tests/mptests/mp06/mptest.ads @@ -43,7 +43,7 @@ package MPTEST is -- -- This variable is set when the test should stop executing. -- - STOP_TEST : RTEMS.BOOLEAN; + STOP_TEST : BOOLEAN; -- -- This variable contains the ID of the remote task with which this @@ -142,107 +142,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 1, -- maximum # timers - 2, -- maximum # semaphores - 0, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp07/mptest.adb b/c/src/ada-tests/mptests/mp07/mptest.adb index 422ad798a8..fc3bd8570a 100644 --- a/c/src/ada-tests/mptests/mp07/mptest.adb +++ b/c/src/ada-tests/mptests/mp07/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +42,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 7 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -54,8 +52,8 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Test_task (Global)" ); RTEMS.TASK_CREATE( - MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + MPTEST.TASK_NAME( TEST_SUPPORT.NODE ), + TEST_SUPPORT.NODE, 2048, RTEMS.TIMESLICE, RTEMS.GLOBAL, @@ -111,14 +109,13 @@ package body MPTEST is procedure TEST_TASK ( ARGUMENT : in RTEMS.TASK_ARGUMENT ) is - COUNT : RTEMS.UNSIGNED32; EVENT_OUT : RTEMS.EVENT_SET; STATUS : RTEMS.STATUS_CODES; begin MPTEST.STOP_TEST := FALSE; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then MPTEST.REMOTE_NODE := 2; else MPTEST.REMOTE_NODE := 1; @@ -140,7 +137,7 @@ package body MPTEST is end loop; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Sending first event to remote task" ); RTEMS.EVENT_SEND( diff --git a/c/src/ada-tests/mptests/mp07/mptest.ads b/c/src/ada-tests/mptests/mp07/mptest.ads index 206cae953f..85f4c38f87 100644 --- a/c/src/ada-tests/mptests/mp07/mptest.ads +++ b/c/src/ada-tests/mptests/mp07/mptest.ads @@ -43,7 +43,7 @@ package MPTEST is -- -- This variable is set when the test should stop executing. -- - STOP_TEST : RTEMS.BOOLEAN; + STOP_TEST : BOOLEAN; -- -- This variable contains the ID of the remote task with which this @@ -102,107 +102,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 1, -- maximum # timers - 2, -- maximum # semaphores - 0, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp08/mptest.adb b/c/src/ada-tests/mptests/mp08/mptest.adb index aa60c0afa7..4df686191e 100644 --- a/c/src/ada-tests/mptests/mp08/mptest.adb +++ b/c/src/ada-tests/mptests/mp08/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +42,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 8 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -54,7 +52,7 @@ package body MPTEST is MPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'E', 'M', ' ' ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Creating Semaphore(Global)" ); @@ -71,8 +69,8 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Test_task (Global)" ); RTEMS.TASK_CREATE( - MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + MPTEST.TASK_NAME( TEST_SUPPORT.NODE ), + TEST_SUPPORT.NODE, 2048, RTEMS.TIMESLICE, RTEMS.GLOBAL, @@ -123,7 +121,7 @@ package body MPTEST is end loop; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then + if TEST_SUPPORT.NODE = 2 then RTEMS.SEMAPHORE_DELETE( MPTEST.SEMAPHORE_ID( 1 ), @@ -174,7 +172,7 @@ package body MPTEST is COUNT := COUNT + 1; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 and then + if TEST_SUPPORT.NODE = 1 and then COUNT >= 1000 then RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS ); diff --git a/c/src/ada-tests/mptests/mp08/mptest.ads b/c/src/ada-tests/mptests/mp08/mptest.ads index a4da0a46a2..51124eca8a 100644 --- a/c/src/ada-tests/mptests/mp08/mptest.ads +++ b/c/src/ada-tests/mptests/mp08/mptest.ads @@ -84,107 +84,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 1, -- maximum # timers - 1, -- maximum # semaphores - 0, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp09/mptest.adb b/c/src/ada-tests/mptests/mp09/mptest.adb index 79b45c984a..8e7a3da783 100644 --- a/c/src/ada-tests/mptests/mp09/mptest.adb +++ b/c/src/ada-tests/mptests/mp09/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +42,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 9 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -74,7 +72,7 @@ package body MPTEST is MPTEST.QUEUE_NAME( 1 ) := RTEMS.BUILD_NAME( 'M', 'S', 'G', ' ' ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Creating Message Queue (Global)" ); RTEMS.MESSAGE_QUEUE_CREATE( @@ -90,8 +88,8 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Test_task (local)" ); RTEMS.TASK_CREATE( - MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ), - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + MPTEST.TASK_NAME( TEST_SUPPORT.NODE ), + TEST_SUPPORT.NODE, 2048, RTEMS.TIMESLICE, RTEMS.DEFAULT_ATTRIBUTES, @@ -296,7 +294,7 @@ package body MPTEST is end loop; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then + if TEST_SUPPORT.NODE = 2 then RTEMS.MESSAGE_QUEUE_DELETE( MPTEST.QUEUE_ID( 1 ), STATUS ); diff --git a/c/src/ada-tests/mptests/mp09/mptest.ads b/c/src/ada-tests/mptests/mp09/mptest.ads index 24170c0a27..80cf89e051 100644 --- a/c/src/ada-tests/mptests/mp09/mptest.ads +++ b/c/src/ada-tests/mptests/mp09/mptest.ads @@ -146,107 +146,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 0, -- maximum # timers - 0, -- maximum # semaphores - 1, -- maximum # message queues - 1, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp10/mptest.adb b/c/src/ada-tests/mptests/mp10/mptest.adb index 46efeeea65..d370cb8e5b 100644 --- a/c/src/ada-tests/mptests/mp10/mptest.adb +++ b/c/src/ada-tests/mptests/mp10/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +42,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 10 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -58,7 +56,7 @@ package body MPTEST is MPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'E', 'M', ' ' ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Creating Message Queue (Global)" ); RTEMS.MESSAGE_QUEUE_CREATE( diff --git a/c/src/ada-tests/mptests/mp10/mptest.ads b/c/src/ada-tests/mptests/mp10/mptest.ads index 9ac9454feb..b69afdfc11 100644 --- a/c/src/ada-tests/mptests/mp10/mptest.ads +++ b/c/src/ada-tests/mptests/mp10/mptest.ads @@ -116,107 +116,4 @@ package MPTEST is RESTART : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 0, -- maximum # timers - 1, -- maximum # semaphores - 1, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp11/mptest.adb b/c/src/ada-tests/mptests/mp11/mptest.adb index 212d1f4cd8..3257fe5de6 100644 --- a/c/src/ada-tests/mptests/mp11/mptest.adb +++ b/c/src/ada-tests/mptests/mp11/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +42,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 11 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -58,7 +56,7 @@ package body MPTEST is MPTEST.PARTITION_NAME( 1 ) := RTEMS.BUILD_NAME( 'P', 'A', 'R', ' ' ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Attempting to create Test_task (Global)" ); RTEMS.TASK_CREATE( diff --git a/c/src/ada-tests/mptests/mp11/mptest.ads b/c/src/ada-tests/mptests/mp11/mptest.ads index 52a897852c..3547f7b12c 100644 --- a/c/src/ada-tests/mptests/mp11/mptest.ads +++ b/c/src/ada-tests/mptests/mp11/mptest.ads @@ -76,107 +76,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 0, -- maximum # global objects - 0 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 0, -- maximum # timers - 1, -- maximum # semaphores - 1, -- maximum # message queues - 0, -- maximum # messages - 1, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp12/mptest.adb b/c/src/ada-tests/mptests/mp12/mptest.adb index 6587054f40..86cf4102ba 100644 --- a/c/src/ada-tests/mptests/mp12/mptest.adb +++ b/c/src/ada-tests/mptests/mp12/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -45,7 +43,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 12 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -57,7 +55,7 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Got to the initialization task" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then + if TEST_SUPPORT.NODE = 2 then RTEMS.TASK_WAKE_AFTER( 1 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS ); TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" ); diff --git a/c/src/ada-tests/mptests/mp12/mptest.ads b/c/src/ada-tests/mptests/mp12/mptest.ads index 471bd4c8e3..8ba7302438 100644 --- a/c/src/ada-tests/mptests/mp12/mptest.ads +++ b/c/src/ada-tests/mptests/mp12/mptest.ads @@ -74,107 +74,4 @@ package MPTEST is array ( RTEMS.UNSIGNED32 range 0 .. 1023 ) of RTEMS.UNSIGNED8; for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT; --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 0, -- maximum # timers - 0, -- maximum # semaphores - 0, -- maximum # message queues - 0, -- maximum # messages - 1, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp13/mptest.adb b/c/src/ada-tests/mptests/mp13/mptest.adb index fcdad6dd43..47eaafaaf5 100644 --- a/c/src/ada-tests/mptests/mp13/mptest.adb +++ b/c/src/ada-tests/mptests/mp13/mptest.adb @@ -28,8 +28,6 @@ with UNSIGNED32_IO; package body MPTEST is - package body PER_NODE_CONFIGURATION is separate; - --PAGE -- -- INIT @@ -44,7 +42,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 13 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -56,7 +54,7 @@ package body MPTEST is MPTEST.SEMAPHORE_NAME( 1 ) := RTEMS.BUILD_NAME( 'S', 'E', 'M', ' ' ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Creating Message Queue (Global)" ); RTEMS.MESSAGE_QUEUE_CREATE( @@ -130,7 +128,7 @@ package body MPTEST is ); TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then RTEMS.TASK_WAKE_AFTER( 5 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS ); TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" ); @@ -179,7 +177,7 @@ package body MPTEST is end loop; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Receiving message ..." ); RTEMS.MESSAGE_QUEUE_RECEIVE( @@ -252,7 +250,7 @@ package body MPTEST is end loop; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS ); TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" ); diff --git a/c/src/ada-tests/mptests/mp13/mptest.ads b/c/src/ada-tests/mptests/mp13/mptest.ads index 348834addc..f8371d447f 100644 --- a/c/src/ada-tests/mptests/mp13/mptest.ads +++ b/c/src/ada-tests/mptests/mp13/mptest.ads @@ -98,107 +98,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.NO_PREEMPT, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 0, -- maximum # timers - 1, -- maximum # semaphores - 1, -- maximum # message queues - 0, -- maximum # messages - 0, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 50 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/mptests/mp14/mptest.adb b/c/src/ada-tests/mptests/mp14/mptest.adb index bc76395838..2984f49f68 100644 --- a/c/src/ada-tests/mptests/mp14/mptest.adb +++ b/c/src/ada-tests/mptests/mp14/mptest.adb @@ -22,15 +22,14 @@ with INTERFACES; use INTERFACES; with INTERFACES.C; -with BSP; with RTEMS; with TEST_SUPPORT; with TEXT_IO; with UNSIGNED32_IO; -package body MPTEST is +with System.Storage_Elements; use System.Storage_Elements; - package body PER_NODE_CONFIGURATION is separate; +package body MPTEST is --PAGE -- @@ -84,7 +83,7 @@ package body MPTEST is TEXT_IO.NEW_LINE( 2 ); TEXT_IO.PUT( "*** TEST 14 -- NODE " ); UNSIGNED32_IO.PUT( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE, + TEST_SUPPORT.NODE, WIDTH => 1 ); TEXT_IO.PUT_LINE( " ***" ); @@ -102,7 +101,7 @@ package body MPTEST is RTEMS.TIMER_FIRE_AFTER( MPTEST.STOP_TIMER_ID, - BSP.MAXIMUM_LONG_TEST_DURATION * TEST_SUPPORT.TICKS_PER_SECOND, + TEST_SUPPORT.MAXIMUM_LONG_TEST_DURATION * TEST_SUPPORT.TICKS_PER_SECOND, MPTEST.STOP_TEST_TSR'ACCESS, RTEMS.NULL_ADDRESS, STATUS @@ -137,11 +136,11 @@ package body MPTEST is loop MPTEST.BUFFERS( INDEX ) := - RTEMS.TO_BUFFER_POINTER( MPTEST.BUFFER_AREAS( INDEX )'ADDRESS ); + MPTEST.BUFFER_AREAS( INDEX )'ADDRESS; end loop; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Creating Semaphore (Global)" ); RTEMS.SEMAPHORE_CREATE( @@ -180,7 +179,7 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Event task (Global)" ); RTEMS.TASK_CREATE( MPTEST.EVENT_TASK_NAME( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE + TEST_SUPPORT.NODE ), 2, 2048, @@ -203,7 +202,7 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Semaphore task (Global)" ); RTEMS.TASK_CREATE( MPTEST.SEMAPHORE_TASK_NAME( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE + TEST_SUPPORT.NODE ), 2, 2048, @@ -226,7 +225,7 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Message Queue task (Global)" ); RTEMS.TASK_CREATE( MPTEST.QUEUE_TASK_NAME( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE + TEST_SUPPORT.NODE ), 2, 2048, @@ -249,7 +248,7 @@ package body MPTEST is TEXT_IO.PUT_LINE( "Creating Partition task (Global)" ); RTEMS.TASK_CREATE( MPTEST.PARTITION_TASK_NAME( - MPTEST.MULTIPROCESSING_CONFIGURATION.NODE + TEST_SUPPORT.NODE ), 2, 2048, @@ -319,7 +318,7 @@ package body MPTEST is STATUS : RTEMS.STATUS_CODES; begin - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then REMOTE_NODE := 2; else REMOTE_NODE := 1; @@ -350,7 +349,7 @@ package body MPTEST is end loop; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then TEXT_IO.PUT_LINE( "Sending events to remote task" ); loop @@ -514,7 +513,7 @@ package body MPTEST is end loop; - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then RTEMS.MESSAGE_QUEUE_SEND( MPTEST.QUEUE_ID( 1 ), @@ -581,7 +580,7 @@ package body MPTEST is TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" ); if MPTEST.STOP_TEST = FALSE then - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then YIELD_COUNT := YIELD_COUNT - 1; @@ -666,7 +665,7 @@ package body MPTEST is "PARTITION_RETURN_BUFFER" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS ); TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "YIELD" ); @@ -737,7 +736,7 @@ package body MPTEST is RTEMS.SEMAPHORE_RELEASE( MPTEST.SEMAPHORE_ID( 1 ), STATUS ); TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "SEMAPHORE_RELEASE" ); - if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then + if TEST_SUPPORT.NODE = 1 then YIELD_COUNT := YIELD_COUNT - 1; diff --git a/c/src/ada-tests/mptests/mp14/mptest.ads b/c/src/ada-tests/mptests/mp14/mptest.ads index 1154e12565..2ae8ec85a7 100644 --- a/c/src/ada-tests/mptests/mp14/mptest.ads +++ b/c/src/ada-tests/mptests/mp14/mptest.ads @@ -106,8 +106,7 @@ package MPTEST is -- BUFFER_AREAS : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.BUFFER; - BUFFERS : - array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.BUFFER_POINTER; + BUFFERS : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ADDRESS; -- -- This is the area used for the partition. @@ -141,7 +140,7 @@ package MPTEST is -- This variable is set when the test should stop executing. -- - STOP_TEST : RTEMS.BOOLEAN; + STOP_TEST : BOOLEAN; -- -- EXIT_TEST @@ -239,107 +238,4 @@ package MPTEST is ARGUMENT : in RTEMS.TASK_ARGUMENT ); --- --- This is the Driver Address Table for this test. --- - - DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := - (1=> - ( - CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization - RTEMS.NO_DRIVER_ENTRY, -- Open - RTEMS.NO_DRIVER_ENTRY, -- Close - RTEMS.NO_DRIVER_ENTRY, -- Read - RTEMS.NO_DRIVER_ENTRY, -- Write - RTEMS.NO_DRIVER_ENTRY -- Control - ) - ); - --- --- This is the Initialization Tasks Table for this test. --- - - INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := - (1=> - ( - RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name - 2048, -- stack size - 1, -- priority - RTEMS.DEFAULT_ATTRIBUTES, -- attributes - MPTEST.INIT'ACCESS, -- entry point - RTEMS.TIMESLICE, -- initial mode - 0 -- argument list - ) - ); - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- BEGIN SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - - -- - -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION - -- - -- DESCRIPTION: - -- - -- This package is the specification for the subpackage - -- which will define the per node configuration parameters. - -- - - package PER_NODE_CONFIGURATION is - - -- - -- LOCAL_NODE_NUMBER - -- - -- DESCRIPTION: - -- - -- This function returns the node number for this node. - -- - - function LOCAL_NODE_NUMBER - return RTEMS.UNSIGNED32; - - pragma INLINE ( LOCAL_NODE_NUMBER ); - - end PER_NODE_CONFIGURATION; - ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --- END SUBPACKAGE -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- - --- --- This is the Multiprocessor Configuration Table for this test. --- - - MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( - MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, - 2, -- maximum # nodes in system - 32, -- maximum # global objects - 32 -- maximum # proxies - ); - --- --- This is the Configuration Table for this test. --- - - CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( - RTEMS.NULL_ADDRESS, -- will be replaced by BSP - 64 * 1024, -- executive RAM size - 10, -- maximum # tasks - 12, -- maximum # timers - 1, -- maximum # semaphores - 1, -- maximum # message queues - 1, -- maximum # messages - 1, -- maximum # partitions - 0, -- maximum # regions - 0, -- maximum # dp memory areas - 0, -- maximum # periods - 0, -- maximum # user extensions - RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick - 1 -- # ticks in a timeslice - ); - end MPTEST; diff --git a/c/src/ada-tests/support/init.c b/c/src/ada-tests/support/init.c index b4059c2055..b670bd3510 100644 --- a/c/src/ada-tests/support/init.c +++ b/c/src/ada-tests/support/init.c @@ -31,6 +31,7 @@ rtems_id tcb_to_id( return tcb->Object.id; } + /* * By putting this in brackets rather than quotes, we get the search * path and can get this file from ".." in the mptests. @@ -41,3 +42,20 @@ rtems_id tcb_to_id( #define CONFIGURE_MEMORY_OVERHEAD (256) #include + +uint32_t milliseconds_per_tick(void) +{ + return CONFIGURE_MICROSECONDS_PER_TICK / 1000; +} + +uint32_t ticks_per_second(void) +{ + /* XXX HACK -- use public API */ + return TOD_TICKS_PER_SECOND; +} + +uint32_t get_node(void) +{ + /* XXX HACK -- use public API */ + return _Objects_Local_node; +} diff --git a/c/src/ada-tests/support/test_support.adb b/c/src/ada-tests/support/test_support.adb index ee2e96f5b0..ae676aea09 100644 --- a/c/src/ada-tests/support/test_support.adb +++ b/c/src/ada-tests/support/test_support.adb @@ -206,8 +206,10 @@ package body Test_Support is ) return RTEMS.Unsigned32 is begin - return RTEMS.Get_Index( TID ) - 1 - - RTEMS.Configuration.RTEMS_API_Configuration.Number_Of_Initialization_Tasks; + -- probably OK + return RTEMS.Get_Index( TID ) - 1; + -- Ignoring this component. + -- - RTEMS.Configuration.RTEMS_API_Configuration.Number_Of_Initialization_Tasks; end Task_Number; @@ -229,7 +231,33 @@ package body Test_Support is function Milliseconds_Per_Tick return RTEMS.Unsigned32 is + function Milliseconds_Per_Tick_Base return RTEMS.Unsigned32; + pragma Import (C, Milliseconds_Per_Tick_Base, "milliseconds_per_tick"); begin - return RTEMS.Configuration.Microseconds_Per_Tick / 1000; + return Milliseconds_Per_Tick_Base; end Milliseconds_Per_Tick; + +--PAGE +-- +-- Milliseconds_Per_Tick +-- + function Ticks_Per_Second + return RTEMS.Interval is + function Ticks_Per_Second_Base return RTEMS.Unsigned32; + pragma Import (C, Ticks_Per_Second_Base, "ticks_per_second"); + begin + return Ticks_Per_Second_Base; + end Ticks_Per_Second; + +-- +-- Node is the node number in a multiprocessor configuration +-- + + function Node + return RTEMS.Unsigned32 is + function Get_Node_Base return RTEMS.Unsigned32; + pragma Import (C, Get_Node_Base, "get_node"); + begin + return Get_Node_Base; + end Node; end Test_Support; diff --git a/c/src/ada-tests/support/test_support.ads b/c/src/ada-tests/support/test_support.ads index eef9c22ede..8122c13f61 100644 --- a/c/src/ada-tests/support/test_support.ads +++ b/c/src/ada-tests/support/test_support.ads @@ -156,8 +156,8 @@ package Test_Support is -- occur each second. -- - Ticks_Per_Second : RTEMS.Interval; - pragma Import (C, Ticks_Per_Second, "_TOD_Ticks_per_second"); + function Ticks_Per_Second + return RTEMS.Interval; -- -- Milliseconds_Per_Tick is the number of milliseconds which @@ -167,6 +167,19 @@ package Test_Support is function Milliseconds_Per_Tick return RTEMS.Unsigned32; +-- +-- Node is the node number in a multiprocessor configuration +-- + + function Node + return RTEMS.Unsigned32; + +-- +-- Longest time in seconds to run a test +-- + + MAXIMUM_LONG_TEST_DURATION : RTEMS.UNSIGNED32; + private end Test_Support; -- cgit v1.2.3