summaryrefslogtreecommitdiff
path: root/c/src/ada-tests/sptests/sp22
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/ada-tests/sptests/sp22')
-rw-r--r--c/src/ada-tests/sptests/sp22/config.h35
-rw-r--r--c/src/ada-tests/sptests/sp22/sp22.adb57
-rw-r--r--c/src/ada-tests/sptests/sp22/sp22.scn29
-rw-r--r--c/src/ada-tests/sptests/sp22/sptest.adb299
-rw-r--r--c/src/ada-tests/sptests/sp22/sptest.ads92
5 files changed, 0 insertions, 512 deletions
diff --git a/c/src/ada-tests/sptests/sp22/config.h b/c/src/ada-tests/sptests/sp22/config.h
deleted file mode 100644
index 09a09692a8..0000000000
--- a/c/src/ada-tests/sptests/sp22/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_MAXIMUM_TIMERS 2
-
-#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/sp22/sp22.adb b/c/src/ada-tests/sptests/sp22/sp22.adb
deleted file mode 100644
index 06cb14a01f..0000000000
--- a/c/src/ada-tests/sptests/sp22/sp22.adb
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- MAIN / BODY
---
--- DESCRIPTION:
---
--- This is the entry point for Test SP22 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 SP22 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 SP22;
-
diff --git a/c/src/ada-tests/sptests/sp22/sp22.scn b/c/src/ada-tests/sptests/sp22/sp22.scn
deleted file mode 100644
index 8422e73141..0000000000
--- a/c/src/ada-tests/sptests/sp22/sp22.scn
+++ /dev/null
@@ -1,29 +0,0 @@
-*** TEST 22 ***
-INIT - timer_create - creating timer 1
-INIT - timer 1 has id (16#10001#)
-TA1 - timer_ident - identing timer 1
-TA1 - timer 1 has id (16#10001#)
-TA1 - clock_get - 9: 0: 0 12/31/1988
-TA1 - timer_after - timer 1 in 3 seconds
-TA1 - task_suspend( SELF )
-TA1 - clock_get - 9: 0: 3 12/31/1988
-TA1 - timer_after - timer 1 in 3 seconds
-TA1 - task_wake_after - 1 second
-TA1 - clock_get - 9: 0: 4 12/31/1988
-TA1 - timer_reset - timer 1
-TA1 - task_suspend( SELF )
-TA1 - clock_get - 9: 0: 7 12/31/1988
-<pause>
-TA1 - timer_after - timer 1 in 3 seconds
-TA1 - timer_cancel - timer 1
-TA1 - clock_get - 9: 0: 7 12/31/1988
-TA1 - timer_when - timer 1 in 3 seconds
-TA1 - task_suspend( SELF )
-TA1 - clock_get - 9: 0:10 12/31/1988
-TA1 - timer_when - timer 1 in 3 seconds
-TA1 - task_wake_after - 1 second
-TA1 - clock_get - 9: 0:11 12/31/1988
-TA1 - timer_cancel - timer 1
-TA1 - task_wake_after - YIELD (only task at priority)
-TA1 - timer_delete - timer 1
-*** END OF TEST 22 ***
diff --git a/c/src/ada-tests/sptests/sp22/sptest.adb b/c/src/ada-tests/sptests/sp22/sptest.adb
deleted file mode 100644
index 830dbf9693..0000000000
--- a/c/src/ada-tests/sptests/sp22/sptest.adb
+++ /dev/null
@@ -1,299 +0,0 @@
---
--- SPTEST / BODY
---
--- DESCRIPTION:
---
--- This package is the implementation of Test 22 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;
-with UNSIGNED32_IO;
-
-package body SPTEST is
-
---PAGE
---
--- INIT
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- TEXT_IO.NEW_LINE( 2 );
- TEXT_IO.PUT_LINE( "*** TEST 22 ***" );
-
- TIME := ( 1988, 12, 31, 9, 0, 0, 0 );
-
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
- SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' );
- SPTEST.TIMER_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'M', '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_START(
- SPTEST.TASK_ID( 1 ),
- SPTEST.TASK_1'ACCESS,
- 0,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
-
- TEXT_IO.PUT_LINE( "INIT - timer_create - creating timer 1" );
- RTEMS.TIMER_CREATE(
- SPTEST.TIMER_NAME( 1 ),
- SPTEST.TIMER_ID( 1 ),
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CREATE OF TM1" );
- TEXT_IO.PUT( "INIT - timer 1 has id (" );
- UNSIGNED32_IO.PUT( SPTEST.TIMER_ID( 1 ), WIDTH => 8, BASE => 16 );
- TEXT_IO.PUT_LINE( ")" );
-
- RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
-
- end INIT;
-
---PAGE
---
--- DELAYED_RESUME
---
-
- procedure DELAYED_RESUME (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- ) is
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.TASK_RESUME( SPTEST.TASK_ID( 1 ), STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESUME OF SELF" );
-
- end DELAYED_RESUME;
-
---PAGE
---
--- PRINT_TIME
---
-
- procedure PRINT_TIME
- is
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- TEST_SUPPORT.PUT_NAME(
- SPTEST.TASK_NAME( 1 ),
- FALSE
- );
-
- TEST_SUPPORT.PRINT_TIME( "- clock_get - ", TIME, "" );
- TEXT_IO.NEW_LINE;
-
- end PRINT_TIME;
-
---PAGE
---
--- TASK_1
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- ) is
- TMID : RTEMS.ID;
- TIME : RTEMS.TIME_OF_DAY;
- STATUS : RTEMS.STATUS_CODES;
- begin
-
--- GET ID
-
- TEXT_IO.PUT_LINE( "TA1 - timer_ident - identing timer 1" );
- RTEMS.TIMER_IDENT( SPTEST.TIMER_NAME( 1 ), TMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_IDENT OF TM1" );
- TEXT_IO.PUT( "TA1 - timer 1 has id (" );
- UNSIGNED32_IO.PUT( SPTEST.TIMER_ID( 1 ), WIDTH => 8, BASE => 16 );
- TEXT_IO.PUT_LINE( ")" );
-
--- AFTER WHICH IS ALLOWED TO FIRE
-
- SPTEST.PRINT_TIME;
-
- TEXT_IO.PUT_LINE( "TA1 - timer_after - timer 1 in 3 seconds" );
- RTEMS.TIMER_FIRE_AFTER(
- TMID,
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.DELAYED_RESUME'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend( SELF )" );
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- SPTEST.PRINT_TIME;
-
--- AFTER WHICH IS RESET AND ALLOWED TO FIRE
-
- TEXT_IO.PUT_LINE( "TA1 - timer_after - timer 1 in 3 seconds" );
- RTEMS.TIMER_FIRE_AFTER(
- TMID,
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.DELAYED_RESUME'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - 1 second" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- SPTEST.PRINT_TIME;
-
- TEXT_IO.PUT_LINE( "TA1 - timer_reset - timer 1" );
- RTEMS.TIMER_RESET( TMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_RESET" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend( SELF )" );
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- SPTEST.PRINT_TIME;
-
-TEST_SUPPORT.PAUSE;
-
---
--- Reset the time since we do not know how long the user waited
--- before pressing <cr> at the pause. This insures that the
--- actual output matches the screen.
---
-
- TIME := ( 1988, 12, 31, 9, 0, 7, 0 );
-
- RTEMS.CLOCK_SET( TIME, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
-
--- after which is canceled
-
- TEXT_IO.PUT_LINE( "TA1 - timer_after - timer 1 in 3 seconds" );
- RTEMS.TIMER_FIRE_AFTER(
- TMID,
- 3 * TEST_SUPPORT.TICKS_PER_SECOND,
- SPTEST.DELAYED_RESUME'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_AFTER" );
-
- TEXT_IO.PUT_LINE( "TA1 - timer_cancel - timer 1" );
- RTEMS.TIMER_CANCEL( TMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CANCEL" );
-
--- when which is allowed to fire
-
- SPTEST.PRINT_TIME;
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- TIME.SECOND := TIME.SECOND + 3;
-
- TEXT_IO.PUT_LINE( "TA1 - timer_when - timer 1 in 3 seconds" );
- RTEMS.TIMER_FIRE_WHEN(
- TMID,
- TIME,
- SPTEST.DELAYED_RESUME'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_suspend( SELF )" );
- RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_SUSPEND" );
-
- SPTEST.PRINT_TIME;
-
--- when which is canceled
-
- RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
-
- TIME.SECOND := TIME.SECOND + 3;
-
- TEXT_IO.PUT_LINE( "TA1 - timer_when - timer 1 in 3 seconds" );
- RTEMS.TIMER_FIRE_WHEN(
- TMID,
- TIME,
- SPTEST.DELAYED_RESUME'ACCESS,
- RTEMS.NULL_ADDRESS,
- STATUS
- );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_FIRE_WHEN" );
-
- TEXT_IO.PUT_LINE( "TA1 - task_wake_after - 1 second" );
- RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
-
- SPTEST.PRINT_TIME;
-
- TEXT_IO.PUT_LINE( "TA1 - timer_cancel - timer 1" );
- RTEMS.TIMER_CANCEL( TMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_CANCEL" );
-
--- delete
-
- TEXT_IO.PUT_LINE(
- "TA1 - task_wake_after - YIELD (only task at priority)"
- );
- RTEMS.TASK_WAKE_AFTER( RTEMS.YIELD_PROCESSOR, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER YIELD" );
-
- TEXT_IO.PUT_LINE( "TA1 - timer_delete - timer 1" );
- RTEMS.TIMER_DELETE( TMID, STATUS );
- TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TIMER_DELETE" );
-
- TEXT_IO.PUT_LINE( "*** END OF TEST 22 ***" );
- RTEMS.SHUTDOWN_EXECUTIVE( 0 );
-
- end TASK_1;
-
-end SPTEST;
diff --git a/c/src/ada-tests/sptests/sp22/sptest.ads b/c/src/ada-tests/sptests/sp22/sptest.ads
deleted file mode 100644
index 9401ce1cc0..0000000000
--- a/c/src/ada-tests/sptests/sp22/sptest.ads
+++ /dev/null
@@ -1,92 +0,0 @@
---
--- SPTEST / SPECIFICATION
---
--- DESCRIPTION:
---
--- This package is the specification for Test 22 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 .. 1 ) of RTEMS.ID;
- TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- These arrays contain the IDs and NAMEs of all RTEMS timers created
--- by this test.
---
-
- TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.ID;
- TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 1 ) of RTEMS.NAME;
-
---
--- INIT
---
--- DESCRIPTION:
---
--- This RTEMS task initializes the application.
---
-
- procedure INIT (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
---
--- DELAYED_RESUME
---
--- DESCRIPTION:
---
--- This subprogram is scheduled to be fired as a timer service
--- routine. When fired this subprogram resumes TASK_1.
---
-
- procedure DELAYED_RESUME (
- IGNORED_ID : in RTEMS.ID;
- IGNORED_ADDRESS : in RTEMS.ADDRESS
- );
-
---
--- PRINT_TIME
---
--- DESCRIPTION:
---
--- This subprogram prints the name of TASK_1 and the current TIME of day.
---
-
- procedure PRINT_TIME;
-
---
--- TASK_1
---
--- DESCRIPTION:
---
--- This RTEMS task tests the Timer Manager.
---
-
- procedure TASK_1 (
- ARGUMENT : in RTEMS.TASK_ARGUMENT
- );
-
-end SPTEST;