diff options
Diffstat (limited to 'c/src/ada-tests/sptests/sp06')
-rw-r--r-- | c/src/ada-tests/sptests/sp06/config.h | 35 | ||||
-rw-r--r-- | c/src/ada-tests/sptests/sp06/sp06.adb | 57 | ||||
-rw-r--r-- | c/src/ada-tests/sptests/sp06/sp06.scn | 38 | ||||
-rw-r--r-- | c/src/ada-tests/sptests/sp06/sptest.adb | 222 | ||||
-rw-r--r-- | c/src/ada-tests/sptests/sp06/sptest.ads | 91 |
5 files changed, 0 insertions, 443 deletions
diff --git a/c/src/ada-tests/sptests/sp06/config.h b/c/src/ada-tests/sptests/sp06/config.h deleted file mode 100644 index 7fc8c7580e..0000000000 --- a/c/src/ada-tests/sptests/sp06/config.h +++ /dev/null @@ -1,35 +0,0 @@ -/* config.h - * - * This include file defines the Configuration Table for this test. - * - * 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$ - */ - - -/* configuration information */ - -#define CONFIGURE_SPTEST - -#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_TICKS_PER_TIMESLICE 100 - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE - -#define CONFIGURE_MAXIMUM_POSIX_THREADS 10 -#define CONFIGURE_MAXIMUM_POSIX_KEYS 10 -#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20 -#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10 - -#include <confdefs.h> - -/* end of include file */ diff --git a/c/src/ada-tests/sptests/sp06/sp06.adb b/c/src/ada-tests/sptests/sp06/sp06.adb deleted file mode 100644 index 8cd49904d7..0000000000 --- a/c/src/ada-tests/sptests/sp06/sp06.adb +++ /dev/null @@ -1,57 +0,0 @@ --- --- MAIN / BODY --- --- DESCRIPTION: --- --- This is the entry point for Test SP06 of the Single Processor 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 SPTEST; -with TEST_SUPPORT; - -procedure SP06 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, - SPTEST.INIT'ACCESS, - 0, - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" ); - - loop - delay 120.0; - end loop; - -end SP06; - diff --git a/c/src/ada-tests/sptests/sp06/sp06.scn b/c/src/ada-tests/sptests/sp06/sp06.scn deleted file mode 100644 index 8dc6c6afae..0000000000 --- a/c/src/ada-tests/sptests/sp06/sp06.scn +++ /dev/null @@ -1,38 +0,0 @@ -*** TEST 6 *** -TA1 - is beginning to run -TA1 - restarting TA3 -TA2 - is beginning to run -TA2 - task_wake_after - sleep 1/2 second -TA2 - task_wake_after - sleep 1/2 second -TA1 - task_restart - restarting TA2 -TA2 - is beginning to run -TA2 - task_wake_after - sleep 1/2 second -TA2 - task_wake_after - sleep 1/2 second -TA1 - task_restart - restarting self -TA2 - task_wake_after - sleep 1/2 second -TA1 - is beginning to run -TA2 - task_wake_after - sleep 1/2 second -TA1 - task_restart - restarting TA2 -TA2 - is beginning to run -TA2 - task_wake_after - sleep 1/2 second -TA2 - task_wake_after - sleep 1/2 second -TA1 - task_restart - restarting self -TA2 - task_wake_after - sleep 1/2 second -TA1 - is beginning to run -TA2 - task_wake_after - sleep 1/2 second -TA1 - task_restart - restarting TA2 -TA2 - is beginning to run -TA2 - task_wake_after - sleep 1/2 second -TA2 - task_wake_after - sleep 1/2 second -TA1 - task_restart - restarting self -TA2 - task_wake_after - sleep 1/2 second -TA1 - is beginning to run -TA2 - task_wake_after - sleep 1/2 second -TA1 - task_restart - restarting TA2 -TA2 - is beginning to run -TA2 - task_wake_after - sleep 1/2 second -TA2 - task_wake_after - sleep 1/2 second -TA1 - task_restart - restarting self -TA2 - task_wake_after - sleep 1/2 second -TA1 - is beginning to run -*** END OF TEST 6 *** diff --git a/c/src/ada-tests/sptests/sp06/sptest.adb b/c/src/ada-tests/sptests/sp06/sptest.adb deleted file mode 100644 index db068639c0..0000000000 --- a/c/src/ada-tests/sptests/sp06/sptest.adb +++ /dev/null @@ -1,222 +0,0 @@ --- --- SPTEST / BODY --- --- DESCRIPTION: --- --- This package is the implementation of Test 6 of the RTEMS --- Single Processor 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 INTERFACES; use INTERFACES; -with RTEMS; -with TEST_SUPPORT; -with TEXT_IO; - -package body SPTEST is - ---PAGE --- --- INIT --- - - procedure INIT ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ) is - STATUS : RTEMS.STATUS_CODES; - PREVIOUS_PRIORITY : RTEMS.TASK_PRIORITY; - begin - - TEXT_IO.NEW_LINE( 2 ); - TEXT_IO.PUT_LINE( "*** TEST 6 ***" ); - - SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' ); - SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME( 'T', 'A', '2', ' ' ); - SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME( 'T', 'A', '3', ' ' ); - - SPTEST.ARGUMENT := 0; - SPTEST.RESTART_ARGUMENT := 1; - - RTEMS.TASK_CREATE( - SPTEST.TASK_NAME( 1 ), - 1, - 2048, - RTEMS.DEFAULT_MODES, - RTEMS.DEFAULT_ATTRIBUTES, - SPTEST.TASK_ID( 1 ), - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" ); - - RTEMS.TASK_CREATE( - SPTEST.TASK_NAME( 2 ), - 1, - 2048, - RTEMS.DEFAULT_MODES, - RTEMS.DEFAULT_ATTRIBUTES, - SPTEST.TASK_ID( 2 ), - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" ); - - RTEMS.TASK_CREATE( - SPTEST.TASK_NAME( 3 ), - 10, - 2048, - RTEMS.DEFAULT_MODES, - RTEMS.DEFAULT_ATTRIBUTES, - SPTEST.TASK_ID( 3 ), - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" ); - - RTEMS.TASK_START( - SPTEST.TASK_ID( 1 ), - SPTEST.TASK_1'ACCESS, - 0, - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" ); - - RTEMS.TASK_START( - SPTEST.TASK_ID( 2 ), - SPTEST.TASK_2'ACCESS, - SPTEST.ARGUMENT, - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" ); - - RTEMS.TASK_START( - SPTEST.TASK_ID( 3 ), - SPTEST.TASK_3'ACCESS, - SPTEST.ARGUMENT, - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" ); - - RTEMS.TASK_SET_PRIORITY( - SPTEST.TASK_ID( 3 ), - 5, - PREVIOUS_PRIORITY, - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SET_PRIORITY OF TA3" ); - - 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 - PASS : RTEMS.UNSIGNED32; - STATUS : RTEMS.STATUS_CODES; - begin - - TEXT_IO.PUT_LINE( "TA1 - is beginning to run" ); - - PASS := ARGUMENT + 1; - - if PASS = 5 then - TEXT_IO.PUT_LINE( "*** END OF TEST 6 ***" ); - RTEMS.SHUTDOWN_EXECUTIVE( 0 ); - end if; - - if PASS = 1 then - TEXT_IO.PUT_LINE( "TA1 - restarting TA3" ); - RTEMS.TASK_RESTART( - SPTEST.TASK_ID( 3 ), - SPTEST.RESTART_ARGUMENT, - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESTART OF TA3" ); - - RTEMS.TASK_WAKE_AFTER( 2 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" ); - - end if; - - RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" ); - - TEXT_IO.PUT_LINE( "TA1 - task_restart - restarting TA2" ); - RTEMS.TASK_RESTART( - SPTEST.TASK_ID( 2 ), - SPTEST.RESTART_ARGUMENT, - STATUS - ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESTART OF TA2" ); - - RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" ); - - TEXT_IO.PUT_LINE( "TA1 - task_restart - restarting self" ); - RTEMS.TASK_RESTART( SPTEST.TASK_ID( 1 ), PASS, STATUS ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESTART OF SELF" ); - - end TASK_1; - ---PAGE --- --- TASK_2 --- - - procedure TASK_2 ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ) is - STATUS : RTEMS.STATUS_CODES; - begin - - TEXT_IO.PUT_LINE( "TA2 - is beginning to run" ); - - if ARGUMENT = SPTEST.ARGUMENT then - RTEMS.TASK_WAKE_AFTER( 2 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" ); - end if; - - loop - - TEXT_IO.PUT_LINE( "TA2 - task_wake_after - sleep 1/2 second" ); - RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND / 2, STATUS ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" ); - - end loop; - - end TASK_2; - ---PAGE --- --- TASK_3 --- - - procedure TASK_3 ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ) is - STATUS : RTEMS.STATUS_CODES; - begin - - RTEMS.TASK_DELETE( RTEMS.SELF, STATUS ); - TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" ); - - end TASK_3; - -end SPTEST; diff --git a/c/src/ada-tests/sptests/sp06/sptest.ads b/c/src/ada-tests/sptests/sp06/sptest.ads deleted file mode 100644 index 53d4825ec4..0000000000 --- a/c/src/ada-tests/sptests/sp06/sptest.ads +++ /dev/null @@ -1,91 +0,0 @@ --- --- SPTEST / SPECIFICATION --- --- DESCRIPTION: --- --- This package is the specification for Test 6 of the RTEMS --- Single Processor 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; - -package SPTEST is - --- --- These arrays contain the IDs and NAMEs of all RTEMS tasks created --- by this test. --- - - TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID; - TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME; - --- --- The following are used as arguments to the various RTEMS tasks --- in this test to indicate when a restart should be performed. - - ARGUMENT : RTEMS.UNSIGNED32; - RESTART_ARGUMENT : RTEMS.UNSIGNED32; - --- --- INIT --- --- DESCRIPTION: --- --- This RTEMS task initializes the application. --- - - procedure INIT ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ); - --- --- TASK_1 --- --- DESCRIPTION: --- --- This RTEMS task tests some of the capabilities of the Task Manager. --- - - procedure TASK_1 ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ); - --- --- TASK_2 --- --- DESCRIPTION: --- --- This RTEMS task tests some of the capabilities of the Task Manager. --- - - procedure TASK_2 ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ); - --- --- TASK_3 --- --- DESCRIPTION: --- --- This RTEMS task tests some of the capabilities of the Task Manager. --- - - procedure TASK_3 ( - ARGUMENT : in RTEMS.TASK_ARGUMENT - ); - -end SPTEST; |