2002-08-26 Joel Sherrill <joel@OARcorp.com>

* tm27 and tm27 are irrelevant as Ada binding tests.
	* tmtests/tm26/Makefile.am, tmtests/tm26/README, tmtests/tm26/tm26.adb,
	tmtests/tm26/tmtest.adb, tmtests/tm26/tmtest.adp,
	tmtests/tm26/tmtest.ads, tmtests/tm27/Makefile.am, tmtests/tm27/README,
	tmtests/tm27/tm27.adb, tmtests/tm27/tmtest.adb,
	tmtests/tm27/tmtest.ads: Removed.
	* configure.ac, tmtests/Makefile.am: Modified to reflect above.
This commit is contained in:
Joel Sherrill
2002-08-26 17:24:44 +00:00
parent f435621be9
commit b2b7cfc91e
14 changed files with 6 additions and 2054 deletions
+6
View File
@@ -4,6 +4,12 @@
even though this test is not supported.
* sptests/sp19/sp19.adb: New file.
2002-08-26 Joel Sherrill <joel@OARcorp.com>
* sptests/sp19/sptest.adb: Modified to follow pattern of SP01
even though this test is not supported.
* sptests/sp19/sp19.adb: New file.
2002-08-26 Joel Sherrill <joel@OARcorp.com>
* mptests/mp01/mptest.ads, mptests/mp02/mptest.ads,
-2
View File
@@ -100,8 +100,6 @@ tmtests/tm22/Makefile
tmtests/tm23/Makefile
tmtests/tm24/Makefile
tmtests/tm25/Makefile
tmtests/tm26/Makefile
tmtests/tm27/Makefile
tmtests/tm28/Makefile
tmtests/tm29/Makefile
tmtests/tmck/Makefile
-2
View File
@@ -26,8 +26,6 @@ SUBDIRS += tm22
SUBDIRS += tm23
SUBDIRS += tm24
SUBDIRS += tm25
SUBDIRS += tm26
SUBDIRS += tm27
SUBDIRS += tm28
SUBDIRS += tm29
SUBDIRS += tmck
-17
View File
@@ -1,17 +0,0 @@
## $Id$
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../automake/compile.am
include $(top_srcdir)/../../../automake/lib.am
include $(top_srcdir)/ada.am
if EXPADA
noinst_PROGRAMS = tm26
endif
tm26_SOURCES = tm26.adb config.h tmtest.adp tmtest.ads
tm26$(EXEEXT): tm26.adp
$(GNATCOMPILE) -margs -a $< -o $@
include $(top_srcdir)/../../../automake/local.am
-6
View File
@@ -1,6 +0,0 @@
#
# $Id$
#
This test requires interfacing to internal RTEMS routines and
is probably not worth the effort to convert.
-57
View File
@@ -1,57 +0,0 @@
--
-- MAIN / BODY
--
-- DESCRIPTION:
--
-- This is the entry point for Test TM26 of the Timing Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
-- Copyright assigned to U.S. Government, 1994.
--
-- The license and distribution terms for this file may in
-- the file LICENSE in this distribution or at
-- http://www.OARcorp.com/rtems/license.html.
--
-- $Id$
--
with RTEMS;
with TMTEST;
with TEST_SUPPORT;
procedure TM26 is
INIT_ID : RTEMS.ID;
STATUS : RTEMS.STATUS_CODES;
begin
RTEMS.TASK_CREATE(
RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
1,
RTEMS.MINIMUM_STACK_SIZE,
RTEMS.NO_PREEMPT,
RTEMS.DEFAULT_ATTRIBUTES,
INIT_ID,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
RTEMS.TASK_START(
INIT_ID,
TMTEST.INIT'ACCESS,
0,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
loop
delay 120.0;
end loop;
end TM26;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-189
View File
@@ -1,189 +0,0 @@
--
-- TMTEST / SPECIFICATION
--
-- DESCRIPTION:
--
-- This package is the specification for Test 26 of the RTEMS
-- Timing Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
-- Copyright assigned to U.S. Government, 1994.
--
-- The license and distribution terms for this file may in
-- the file LICENSE in this distribution or at
-- http://www.OARcorp.com/rtems/license.html.
--
-- $Id$
--
with TIMER_DRIVER;
with RTEMS;
package TMTEST is
--
-- This points to the RTEMS task control block for the MIDDLE_TASK.
--
MIDDLE_TCB : RTEMS.TCB_POINTER;
--
-- The following is the ID of the semaphore used for timing operations.
--
SEMAPHORE_ID : RTEMS.ID;
--
-- The following variable is set to the execution time returned
-- by the timer.
--
END_TIME : RTEMS.UNSIGNED32;
--
-- INIT
--
-- DESCRIPTION:
--
-- This RTEMS task initializes the application.
--
procedure INIT (
ARGUMENT : in RTEMS.TASK_ARGUMENT
);
--
-- NULL_TASK
--
-- DESCRIPTION:
--
-- This RTEMS task has a NULL body and is only included to
-- allow TASK_START to be invoked without impacting another
-- task.
--
procedure NULL_TASK (
ARGUMENT : in RTEMS.TASK_ARGUMENT
);
--
-- HIGH_TASK
--
-- DESCRIPTION:
--
-- This RTEMS task is the highest priority test task and
-- thus executes first. It is responsible for measuring
-- and reporting the following times:
--
-- + THREAD_DISABLE_DISPATCH
-- + THREAD_ENABLE_DISPATCH
-- + THREAD_SET_STATE
--
-- After measuring and reporting the above times, this task
-- starts the timer and forces dispatch to the MIDDLE_TASK.
--
procedure HIGH_TASK (
ARGUMENT : in RTEMS.TASK_ARGUMENT
);
--
-- MIDDLE_TASK
--
-- DESCRIPTION:
--
-- This RTEMS task stops the timer and reports the execution
-- time for THREAD_DISPATCH without any floating point context
-- save and restore involved. Following this, it starts the
-- timer and forces a CONTEXT_SWITCH to the LOW_TASK.
--
procedure MIDDLE_TASK (
ARGUMENT : in RTEMS.TASK_ARGUMENT
);
--
-- LOW_TASK
--
-- DESCRIPTION:
--
-- This RTEMS task stops the timer and reports the execution
-- time for a raw CONTEXT_SWITCH without any floating point context
-- save and restore involved. Following this, it starts the
-- timer and performs a CONTEXT_RESTORE_FP for the FLOATING_POINT_TASK_1
-- and a CONTEXT_SWITCH to FLOATING_POINT_TASK_1.
--
procedure LOW_TASK (
ARGUMENT : in RTEMS.TASK_ARGUMENT
);
--
-- FLOATING_POINT_TASK_1
--
-- DESCRIPTION:
--
-- This RTEMS task stops the timer and reports the execution
-- time for a CONTEXT_SWITCH which restores the first floating
-- point context. Following this, it starts the
-- timer and performs a CONTEXT_SAVE_FP and CONTEXT_RESTORE_FP
-- and a CONTEXT_SWITCH to FLOATING_POINT_TASK_2. Once
-- control is returned to this task FLOATING_POINT_TASK_2, the
-- timer is stopped and the execution time for CONTEXT_SWITCH
-- from a used to an initialized floating point context is reported.
-- Following this, it starts the timer and performs a
-- CONTEXT_SAVE_FP and CONTEXT_RESTORE_FP and a CONTEXT_SWITCH
-- to FLOATING_POINT_TASK_2.
--
procedure FLOATING_POINT_TASK_1 (
ARGUMENT : in RTEMS.TASK_ARGUMENT
);
--
-- FLOATING_POINT_TASK_2
--
-- DESCRIPTION:
--
-- This RTEMS task stops the timer and reports the execution
-- time for a CONTEXT_SWITCH which switches from one freshly
-- initialized floating point context to another freshly
-- initialized floating point context. Following this, it
-- "dirties" its floating point context and starts the
-- timer. After this it performs a CONTEXT_SAVE_FP and
-- CONTEXT_RESTORE_FP and a CONTEXT_SWITCH to FLOATING_POINT_TASK_1.
-- Once control is returned to this task FLOATING_POINT_TASK_2, the
-- timer is stopped and the execution time for CONTEXT_SWITCH
-- from one used floating point context to another used floating
-- point context is reported. After this, this task invokes
-- the COMPLETE_TEST subprogram to measure and report
-- the remaining execution times measured by this test.
--
procedure FLOATING_POINT_TASK_2 (
ARGUMENT : in RTEMS.TASK_ARGUMENT
);
--
-- COMPLETE_TEST
--
-- DESCRIPTION:
--
-- This subprogram is responsible for measuring and reporting the
-- following execution times:
--
-- + THREAD_RESUME
-- + THREAD_UNBLOCK
-- + THREAD_READY
-- + THREAD_GET with a valid id
-- + THREAD_GET with an invalid id
--
procedure COMPLETE_TEST;
end TMTEST;
-17
View File
@@ -1,17 +0,0 @@
## $Id$
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../../../automake/compile.am
include $(top_srcdir)/../../../automake/lib.am
include $(top_srcdir)/ada.am
if EXPADA
noinst_PROGRAMS = tm27
endif
tm27_SOURCES = tm27.adb config.h tmtest.adb tmtest.ads
tm27$(EXEEXT): tm27.adb
$(GNATCOMPILE) -margs -a $< -o $@
include $(top_srcdir)/../../../automake/local.am
-8
View File
@@ -1,8 +0,0 @@
#
# $Id$
#
This test requires interfacing to BSP provided macros which aid in
installing an ISR. It may or may not be worth the effort to convert.
Primarily this would require a C file which provided real bodies
to invoke for these macros.
-57
View File
@@ -1,57 +0,0 @@
--
-- MAIN / BODY
--
-- DESCRIPTION:
--
-- This is the entry point for Test TM27 of the Timing Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
-- Copyright assigned to U.S. Government, 1994.
--
-- The license and distribution terms for this file may in
-- the file LICENSE in this distribution or at
-- http://www.OARcorp.com/rtems/license.html.
--
-- $Id$
--
with RTEMS;
with TMTEST;
with TEST_SUPPORT;
procedure TM27 is
INIT_ID : RTEMS.ID;
STATUS : RTEMS.STATUS_CODES;
begin
RTEMS.TASK_CREATE(
RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
1,
RTEMS.MINIMUM_STACK_SIZE,
RTEMS.NO_PREEMPT,
RTEMS.DEFAULT_ATTRIBUTES,
INIT_ID,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
RTEMS.TASK_START(
INIT_ID,
TMTEST.INIT'ACCESS,
0,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
loop
delay 120.0;
end loop;
end TM27;
-268
View File
@@ -1,268 +0,0 @@
--
-- TMTEST / BODY
--
-- DESCRIPTION:
--
-- This package is the implementation of Test 27 of the RTEMS
-- Timing Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
-- Copyright assigned to U.S. Government, 1994.
--
-- The license and distribution terms for this file may in
-- the file LICENSE in this distribution or at
-- http://www.OARcorp.com/rtems/license.html.
--
-- $Id$
--
with INTERRUPT_TIME_TEST_SUPPORT;
with INTERFACES; use INTERFACES;
with RTEMS_CALLING_OVERHEAD;
with RTEMS;
with RTEMS_TEST_SUPPORT;
with TEST_SUPPORT;
with TEXT_IO;
with TIME_TEST_SUPPORT;
with UNSIGNED32_IO;
package body TMTEST is
--PAGE
--
-- INIT
--
procedure INIT (
ARGUMENT : in RTEMS.TASK_ARGUMENT
) is
STATUS : RTEMS.STATUS_CODES;
begin
TEXT_IO.NEW_LINE( 2 );
TEXT_IO.PUT_LINE( "*** TIME TEST 27 ***" );
RTEMS.TASK_CREATE(
RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' ),
254,
2048,
RTEMS.DEFAULT_MODES,
RTEMS.DEFAULT_ATTRIBUTES,
TMTEST.TASK_ID( 1 ),
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE TASK_1" );
RTEMS.TASK_START(
TMTEST.TASK_ID( 1 ),
TMTEST.TASK_1'ACCESS,
0,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START TASK_1" );
RTEMS.TASK_CREATE(
RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' ),
254,
2048,
RTEMS.DEFAULT_MODES,
RTEMS.DEFAULT_ATTRIBUTES,
TMTEST.TASK_ID( 2 ),
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE TASK_2" );
RTEMS.TASK_START(
TMTEST.TASK_ID( 2 ),
TMTEST.TASK_2'ACCESS,
0,
STATUS
);
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START TASK_2" );
RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
end INIT;
--PAGE
--
-- TASK_1
--
procedure TASK_1 (
ARGUMENT : in RTEMS.TASK_ARGUMENT
) is
begin
RTEMS_TEST_SUPPORT.THREAD_DISPATCH_DISABLE_LEVEL := 1;
TMTEST.INTERRUPT_NEST := 1;
INTERRUPT_TIME_TEST_SUPPORT.INSTALL_HANDLER(
TMTEST.ISR_HANDLER'ADDRESS
);
TIMER_DRIVER.INITIALIZE;
INTERRUPT_TIME_TEST_SUPPORT.CAUSE_INTERRUPT;
-- goes to ISR_HANDLER
TMTEST.INTERRUPT_RETURN_TIME := TIMER_DRIVER.READ_TIMER;
TIME_TEST_SUPPORT.PUT_TIME(
"INTERRUPT_ENTER (nested interrupt)",
TMTEST.INTERRUPT_ENTER_NESTED_TIME,
1,
0,
0
);
TIME_TEST_SUPPORT.PUT_TIME(
"INTERRUPT_RETURN (nested interrupt)",
TMTEST.INTERRUPT_RETURN_NESTED_TIME,
1,
0,
0
);
TMTEST.INTERRUPT_NEST := 0;
RTEMS_TEST_SUPPORT.THREAD_DISPATCH_DISABLE_LEVEL := 0;
TIMER_DRIVER.INITIALIZE;
INTERRUPT_TIME_TEST_SUPPORT.CAUSE_INTERRUPT;
-- goes to ISR_HANDLER
TMTEST.INTERRUPT_RETURN_TIME := TIMER_DRIVER.READ_TIMER;
TIME_TEST_SUPPORT.PUT_TIME(
"INTERRUPT_ENTER (no preempt)",
TMTEST.INTERRUPT_ENTER_TIME,
1,
0,
0
);
TIME_TEST_SUPPORT.PUT_TIME(
"INTERRUPT_RETURN (no preempt)",
TMTEST.INTERRUPT_RETURN_TIME,
1,
0,
0
);
RTEMS_TEST_SUPPORT.THREAD_DISPATCH_DISABLE_LEVEL := 0;
RTEMS_TEST_SUPPORT.THREAD_HEIR :=
RTEMS_TEST_SUPPORT.THREAD_TO_CONTROL_POINTER(
RTEMS_TEST_SUPPORT.CHAIN_NODE_POINTER_TO_ADDRESS(
RTEMS_TEST_SUPPORT.THREAD_READY_CHAIN( 254 ).LAST
)
);
RTEMS_TEST_SUPPORT.CONTEXT_SWITCH_NECESSARY := TRUE;
TIMER_DRIVER.INITIALIZE;
INTERRUPT_TIME_TEST_SUPPORT.CAUSE_INTERRUPT;
-- goes to ISR_HANDLER
end TASK_1;
--PAGE
--
-- TASK_2
--
procedure TASK_2 (
ARGUMENT : in RTEMS.TASK_ARGUMENT
) is
begin
TMTEST.INTERRUPT_RETURN_TIME := TIMER_DRIVER.READ_TIMER;
TIME_TEST_SUPPORT.PUT_TIME(
"INTERRUPT_ENTER (preempt)",
TMTEST.INTERRUPT_ENTER_TIME,
1,
0,
0
);
TIME_TEST_SUPPORT.PUT_TIME(
"INTERRUPT_RETURN (preempt)",
TMTEST.INTERRUPT_RETURN_TIME,
1,
0,
0
);
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TASK_2;
--PAGE
--
-- ISR_HANDLER
--
--
-- The ISR_HANDLER and ISR_HANDLER_INNER subprograms are structured
-- so that there will be as little entry overhead as possible included
-- in the interrupt entry time.
--
procedure ISR_HANDLER (
VECTOR : in RTEMS.VECTOR_NUMBER
) is
begin
TMTEST.END_TIME := TIMER_DRIVER.READ_TIMER;
TMTEST.ISR_HANDLER_INNER;
end ISR_HANDLER;
--
-- ISR_HANDLER_INNER
--
procedure ISR_HANDLER_INNER
is
begin
-- enable tracing here is necessary
INTERRUPT_TIME_TEST_SUPPORT.CLEAR_INTERRUPT;
case TMTEST.INTERRUPT_NEST is
when 0 =>
TMTEST.INTERRUPT_ENTER_TIME := TMTEST.END_TIME;
when 1 =>
TMTEST.INTERRUPT_ENTER_TIME := TMTEST.END_TIME;
TMTEST.INTERRUPT_NEST := 2;
TIMER_DRIVER.INITIALIZE;
INTERRUPT_TIME_TEST_SUPPORT.CAUSE_INTERRUPT;
-- goes to a nested copy of ISR_HANDLER
TMTEST.INTERRUPT_RETURN_NESTED_TIME := TIMER_DRIVER.READ_TIMER;
when 2 =>
TMTEST.INTERRUPT_ENTER_NESTED_TIME := TMTEST.END_TIME;
when others =>
NULL;
end case;
-- Start the timer so interrupt return times can be measured
TIMER_DRIVER.INITIALIZE;
end ISR_HANDLER_INNER;
end TMTEST;
-131
View File
@@ -1,131 +0,0 @@
--
-- TMTEST / SPECIFICATION
--
-- DESCRIPTION:
--
-- This package is the specification for Test 27 of the RTEMS
-- Timing Test Suite.
--
-- DEPENDENCIES:
--
--
--
-- COPYRIGHT (c) 1989-1997.
-- On-Line Applications Research Corporation (OAR).
-- Copyright assigned to U.S. Government, 1994.
--
-- The license and distribution terms for this file may in
-- the file LICENSE in this distribution or at
-- http://www.OARcorp.com/rtems/license.html.
--
-- $Id$
--
with TIMER_DRIVER;
with RTEMS;
package TMTEST is
--
-- This array contains the IDs of all RTEMS tasks created by this test.
--
TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
--
-- The following variable is set to the execution time returned
-- by the timer.
--
END_TIME : RTEMS.UNSIGNED32;
--
-- The following variable indicates which interrupt case is
-- currently being timed.
--
INTERRUPT_NEST : RTEMS.UNSIGNED32;
--
-- The following variables are set to the appropriate execution
-- times by the ISR. This is done so the times will be available
-- to be printed by a task.
--
INTERRUPT_ENTER_TIME : RTEMS.UNSIGNED32;
INTERRUPT_RETURN_TIME : RTEMS.UNSIGNED32;
INTERRUPT_ENTER_NESTED_TIME : RTEMS.UNSIGNED32;
INTERRUPT_RETURN_NESTED_TIME : RTEMS.UNSIGNED32;
--
-- INIT
--
-- DESCRIPTION:
--
-- This RTEMS task initializes the application.
--
procedure INIT (
ARGUMENT : in RTEMS.TASK_ARGUMENT
);
--
-- TASK_1
--
-- DESCRIPTION:
--
-- This RTEMS task reports the following execution times:
--
-- + interrupt entry overhead for a nested interrupt
-- + interrupt exit overhead for a nested interrupt
-- + interrupt entry overhead when no preemption occurs
-- + interrupt exit overhead when no preemption occurs
--
procedure TASK_1 (
ARGUMENT : in RTEMS.TASK_ARGUMENT
);
--
-- TASK_2
--
-- DESCRIPTION:
--
-- This RTEMS task reports the following execution times:
--
-- + interrupt entry overhead when preemption occurs
-- + interrupt exit overhead when preemption occurs
--
procedure TASK_2 (
ARGUMENT : in RTEMS.TASK_ARGUMENT
);
--
-- ISR_HANDLER
--
-- DESCRIPTION:
--
-- This subprogram is the test ISR. It simply stops the
-- timer and save the execution time for ISR_HANDLER_INNER.
-- This is done to minimize the subroutine linkage overhead
-- for this routine.
--
procedure ISR_HANDLER (
VECTOR : in RTEMS.VECTOR_NUMBER
);
--
-- ISR_HANDLER_INNER
--
-- DESCRIPTION:
--
-- This subprogram is responsible for storing the execution
-- time for the case currently being timed.
--
procedure ISR_HANDLER_INNER;
end TMTEST;