diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-12 10:00:10 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-12 10:53:16 +0200 |
commit | ee537ea3dd964d4de3565a36b4857af31fb5a3f4 (patch) | |
tree | ad8b328a58469ca0632e3e61cd94f37c9d97cc25 /testsuites/ada/sptests/sp25 | |
parent | ada-tests: Use _SUBDIRS instead of SUBDIRS (diff) | |
download | rtems-ee537ea3dd964d4de3565a36b4857af31fb5a3f4.tar.bz2 |
ada-tests: Move to testsuites/ada
This solves a build dependency issue, e.g. building tests before
librtemsbsp.a exists.
Close #3079.
Diffstat (limited to 'testsuites/ada/sptests/sp25')
-rw-r--r-- | testsuites/ada/sptests/sp25/Makefile.am | 16 | ||||
-rw-r--r-- | testsuites/ada/sptests/sp25/ada_sp25.scn | 29 | ||||
-rw-r--r-- | testsuites/ada/sptests/sp25/config.h | 31 | ||||
-rw-r--r-- | testsuites/ada/sptests/sp25/sp25.adb | 55 | ||||
-rw-r--r-- | testsuites/ada/sptests/sp25/sptest.adb | 362 | ||||
-rw-r--r-- | testsuites/ada/sptests/sp25/sptest.ads | 103 |
6 files changed, 596 insertions, 0 deletions
diff --git a/testsuites/ada/sptests/sp25/Makefile.am b/testsuites/ada/sptests/sp25/Makefile.am new file mode 100644 index 0000000000..b4b864d8d7 --- /dev/null +++ b/testsuites/ada/sptests/sp25/Makefile.am @@ -0,0 +1,16 @@ +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am + +include $(top_srcdir)/ada.am + +noinst_PROGRAMS = ada_sp25 +ada_sp25_SOURCES = sp25.adb config.h sptest.adb sptest.ads +ada_sp25_SOURCES += ../../support/init.c + +ada_sp25$(EXEEXT): sp25.adb init.$(OBJEXT) + $(GNATCOMPILE) -margs -a $< -o $@ + +scndir = $(rtems_ada_testsdir) +dist_scn_DATA = ada_sp25.scn + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/ada/sptests/sp25/ada_sp25.scn b/testsuites/ada/sptests/sp25/ada_sp25.scn new file mode 100644 index 0000000000..bb568001ac --- /dev/null +++ b/testsuites/ada/sptests/sp25/ada_sp25.scn @@ -0,0 +1,29 @@ +*** TEST 25 *** +TA1 - region_ident - rnid => 16#32010001# +TA1 - region_get_segment - wait on 64 byte segment from region 1 +TA1 - got segment from region 1 - 16#10# +TA1 - region_get_segment - wait on 128 byte segment from region 1 +TA1 - got segment from region 1 - 16#70# +TA1 - region_get_segment - wait on 256 byte segment from region 1 +TA1 - got segment from region 1 - 16#110# +TA1 - region_get_segment - wait on 512 byte segment from region 1 +TA1 - got segment from region 1 - 16#230# +TA1 - region_get_segment - wait on 1024 byte segment from region 1 +TA1 - got segment from region 1 - 16#450# +TA1 - region_get_segment - wait on 2048 byte segment from region 1 +TA1 - got segment from region 1 - 16#870# +TA1 - region_get_segment - wait on 4096 byte segment from region 1 +TA1 - got segment from region 1 - 16#1090# +TA1 - region_get_segment - wait on 8192 byte segment from region 1 +TA1 - got segment from region 1 - 16#20B0# +<pause> +TA1 - region_return_segment - return segment to region 1 - 16#110# +TA1 - region_return_segment - return segment to region 1 - 16#230# +TA1 - region_return_segment - return segment to region 1 - 16#10# +TA1 - region_return_segment - return segment to region 1 - 16#70# +TA1 - region_return_segment - return segment to region 1 - 16#1090# +TA1 - region_return_segment - return segment to region 1 - 16#870# +TA1 - region_return_segment - return segment to region 1 - 16#20B0# +TA1 - region_return_segment - return segment to region 1 - 16#450# +TA1 - region_delete - walks heap if debug enabled +*** END OF TEST 25 *** diff --git a/testsuites/ada/sptests/sp25/config.h b/testsuites/ada/sptests/sp25/config.h new file mode 100644 index 0000000000..aa74afdd45 --- /dev/null +++ b/testsuites/ada/sptests/sp25/config.h @@ -0,0 +1,31 @@ +/* config.h + * + * This include file defines the Configuration Table for this test. + * + * COPYRIGHT (c) 1989-2007. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may in + * the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + + +/* configuration information */ + +#define CONFIGURE_SPTEST + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_TASKS 2 +#define CONFIGURE_MAXIMUM_REGIONS 1 + +#define CONFIGURE_POSIX_INIT_THREAD_TABLE + +#define CONFIGURE_MAXIMUM_POSIX_THREADS 10 +#define CONFIGURE_MAXIMUM_POSIX_KEYS 10 + +#include <rtems/confdefs.h> + +/* end of include file */ diff --git a/testsuites/ada/sptests/sp25/sp25.adb b/testsuites/ada/sptests/sp25/sp25.adb new file mode 100644 index 0000000000..00db138fa9 --- /dev/null +++ b/testsuites/ada/sptests/sp25/sp25.adb @@ -0,0 +1,55 @@ +-- +-- MAIN / BODY +-- +-- DESCRIPTION: +-- +-- This is the entry point for Test SP25 of the Single Processor Test Suite. +-- +-- DEPENDENCIES: +-- +-- +-- +-- COPYRIGHT (c) 1989-2011. +-- On-Line Applications Research Corporation (OAR). +-- +-- The license and distribution terms for this file may in +-- the file LICENSE in this distribution or at +-- http://www.rtems.org/license/LICENSE. +-- + +with RTEMS; +with RTEMS.TASKS; +with SPTEST; +with TEST_SUPPORT; + +procedure SP25 is + INIT_ID : RTEMS.ID; + STATUS : RTEMS.STATUS_CODES; +begin + + RTEMS.TASKS.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.TASKS.START( + INIT_ID, + SPTEST.INIT'ACCESS, + 0, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" ); + + loop + delay 120.0; + end loop; + +end SP25; + diff --git a/testsuites/ada/sptests/sp25/sptest.adb b/testsuites/ada/sptests/sp25/sptest.adb new file mode 100644 index 0000000000..1fb103e966 --- /dev/null +++ b/testsuites/ada/sptests/sp25/sptest.adb @@ -0,0 +1,362 @@ +-- +-- SPTEST / BODY +-- +-- DESCRIPTION: +-- +-- This package is the implementation of Test 25 of the RTEMS +-- Single Processor Test Suite. +-- +-- DEPENDENCIES: +-- +-- +-- +-- COPYRIGHT (c) 1989-2011. +-- On-Line Applications Research Corporation (OAR). +-- +-- The license and distribution terms for this file may in +-- the file LICENSE in this distribution or at +-- http://www.rtems.org/license/LICENSE. +-- + +with TEST_SUPPORT; +with TEXT_IO; +with UNSIGNED32_IO; +with RTEMS.REGION; + +package body SPTEST is + +-- +-- INIT +-- + + procedure INIT ( + ARGUMENT : in RTEMS.TASKS.ARGUMENT + ) is + pragma Unreferenced(ARGUMENT); + STATUS : RTEMS.STATUS_CODES; + begin + + TEXT_IO.NEW_LINE( 2 ); + TEXT_IO.PUT_LINE( "*** TEST 25 ***" ); + + SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME( 'T', 'A', '1', ' ' ); + + RTEMS.TASKS.CREATE( + SPTEST.TASK_NAME( 1 ), + SPTEST.BASE_PRIORITY, + 2048, + RTEMS.DEFAULT_MODES, + RTEMS.DEFAULT_ATTRIBUTES, + SPTEST.TASK_ID( 1 ), + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" ); + + RTEMS.TASKS.START( + SPTEST.TASK_ID( 1 ), + SPTEST.TASK_1'ACCESS, + 0, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" ); + + SPTEST.REGION_NAME( 1 ) := RTEMS.BUILD_NAME( 'R', 'N', '1', ' ' ); + + RTEMS.REGION.CREATE( + SPTEST.REGION_NAME( 1 ), + SPTEST.AREA_1'ADDRESS, + 64000, + 32, + RTEMS.DEFAULT_ATTRIBUTES, + SPTEST.REGION_ID( 1 ), + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_CREATE OF RN1" ); + + RTEMS.TASKS.DELETE( RTEMS.SELF, STATUS ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" ); + + end INIT; + +-- +-- PUT_ADDRESS_FROM_AREA_1 +-- + + procedure PUT_ADDRESS_FROM_AREA_1 ( + TO_BE_PRINTED : in RTEMS.ADDRESS + ) is + + begin + + UNSIGNED32_IO.PUT( + RTEMS.SUBTRACT( TO_BE_PRINTED, SPTEST.AREA_1'ADDRESS ), + WIDTH => 8, + BASE => 16 + ); + + end PUT_ADDRESS_FROM_AREA_1; + +-- +-- TASK_1 +-- + + procedure TASK_1 ( + ARGUMENT : in RTEMS.TASKS.ARGUMENT + ) is + pragma Unreferenced(ARGUMENT); + RNID : RTEMS.ID; + SEGMENT_ADDRESS_1 : RTEMS.ADDRESS; + SEGMENT_ADDRESS_2 : RTEMS.ADDRESS; + SEGMENT_ADDRESS_3 : RTEMS.ADDRESS; + SEGMENT_ADDRESS_4 : RTEMS.ADDRESS; + SEGMENT_ADDRESS_5 : RTEMS.ADDRESS; + SEGMENT_ADDRESS_6 : RTEMS.ADDRESS; + SEGMENT_ADDRESS_7 : RTEMS.ADDRESS; + SEGMENT_ADDRESS_8 : RTEMS.ADDRESS; + STATUS : RTEMS.STATUS_CODES; + begin + + RTEMS.REGION.IDENT( SPTEST.REGION_NAME( 1 ), RNID, STATUS ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_IDENT OF RN1" ); + TEXT_IO.PUT( "TA1 - region_ident - rnid => " ); + UNSIGNED32_IO.PUT( RNID, WIDTH => 8, BASE => 16 ); + TEXT_IO.NEW_LINE; + + TEXT_IO.PUT( "TA1 - region_get_segment - wait on " ); + TEXT_IO.PUT_LINE( "64 byte segment from region 1" ); + RTEMS.REGION.GET_SEGMENT( + SPTEST.REGION_ID( 1 ), + 64, + RTEMS.DEFAULT_OPTIONS, + RTEMS.NO_TIMEOUT, + SEGMENT_ADDRESS_1, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" ); + TEXT_IO.PUT( "TA1 - got segment from region 1 - " ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_1 ); + TEXT_IO.NEW_LINE; + + TEXT_IO.PUT( "TA1 - region_get_segment - wait on " ); + TEXT_IO.PUT_LINE( "128 byte segment from region 1" ); + RTEMS.REGION.GET_SEGMENT( + SPTEST.REGION_ID( 1 ), + 128, + RTEMS.DEFAULT_OPTIONS, + RTEMS.NO_TIMEOUT, + SEGMENT_ADDRESS_2, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" ); + TEXT_IO.PUT( "TA1 - got segment from region 1 - " ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_2 ); + TEXT_IO.NEW_LINE; + + TEXT_IO.PUT( "TA1 - region_get_segment - wait on " ); + TEXT_IO.PUT_LINE( "256 byte segment from region 1" ); + RTEMS.REGION.GET_SEGMENT( + SPTEST.REGION_ID( 1 ), + 256, + RTEMS.DEFAULT_OPTIONS, + RTEMS.NO_TIMEOUT, + SEGMENT_ADDRESS_3, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" ); + TEXT_IO.PUT( "TA1 - got segment from region 1 - " ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_3 ); + TEXT_IO.NEW_LINE; + + TEXT_IO.PUT( "TA1 - region_get_segment - wait on " ); + TEXT_IO.PUT_LINE( "512 byte segment from region 1" ); + RTEMS.REGION.GET_SEGMENT( + SPTEST.REGION_ID( 1 ), + 512, + RTEMS.DEFAULT_OPTIONS, + RTEMS.NO_TIMEOUT, + SEGMENT_ADDRESS_4, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" ); + TEXT_IO.PUT( "TA1 - got segment from region 1 - " ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_4 ); + TEXT_IO.NEW_LINE; + + TEXT_IO.PUT( "TA1 - region_get_segment - wait on " ); + TEXT_IO.PUT_LINE( "1024 byte segment from region 1" ); + RTEMS.REGION.GET_SEGMENT( + SPTEST.REGION_ID( 1 ), + 1024, + RTEMS.DEFAULT_OPTIONS, + RTEMS.NO_TIMEOUT, + SEGMENT_ADDRESS_5, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" ); + TEXT_IO.PUT( "TA1 - got segment from region 1 - " ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_5 ); + TEXT_IO.NEW_LINE; + + TEXT_IO.PUT( "TA1 - region_get_segment - wait on " ); + TEXT_IO.PUT_LINE( "2048 byte segment from region 1" ); + RTEMS.REGION.GET_SEGMENT( + SPTEST.REGION_ID( 1 ), + 2048, + RTEMS.DEFAULT_OPTIONS, + RTEMS.NO_TIMEOUT, + SEGMENT_ADDRESS_6, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" ); + TEXT_IO.PUT( "TA1 - got segment from region 1 - " ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_6 ); + TEXT_IO.NEW_LINE; + + TEXT_IO.PUT( "TA1 - region_get_segment - wait on " ); + TEXT_IO.PUT_LINE( "4096 byte segment from region 1" ); + RTEMS.REGION.GET_SEGMENT( + SPTEST.REGION_ID( 1 ), + 4096, + RTEMS.DEFAULT_OPTIONS, + RTEMS.NO_TIMEOUT, + SEGMENT_ADDRESS_7, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" ); + TEXT_IO.PUT( "TA1 - got segment from region 1 - " ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_7 ); + TEXT_IO.NEW_LINE; + + TEXT_IO.PUT( "TA1 - region_get_segment - wait on " ); + TEXT_IO.PUT_LINE( "8192 byte segment from region 1" ); + RTEMS.REGION.GET_SEGMENT( + SPTEST.REGION_ID( 1 ), + 8192, + RTEMS.DEFAULT_OPTIONS, + RTEMS.NO_TIMEOUT, + SEGMENT_ADDRESS_8, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_GET_SEGMENT" ); + TEXT_IO.PUT( "TA1 - got segment from region 1 - " ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_8 ); + TEXT_IO.NEW_LINE; + +TEST_SUPPORT.PAUSE; + + TEXT_IO.PUT( + "TA1 - region_return_segment - return segment to region 1 - " + ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_3 ); + RTEMS.REGION.RETURN_SEGMENT( + SPTEST.REGION_ID( 1 ), + SEGMENT_ADDRESS_3, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" ); + TEXT_IO.NEW_LINE; + -- SEGMENT_ADDRESS_3 := RTEMS.NULL_ADDRESS; + + TEXT_IO.PUT( + "TA1 - region_return_segment - return segment to region 1 - " + ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_4 ); + RTEMS.REGION.RETURN_SEGMENT( + SPTEST.REGION_ID( 1 ), + SEGMENT_ADDRESS_4, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" ); + TEXT_IO.NEW_LINE; + -- SEGMENT_ADDRESS_4 := RTEMS.NULL_ADDRESS; + + TEXT_IO.PUT( + "TA1 - region_return_segment - return segment to region 1 - " + ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_1 ); + RTEMS.REGION.RETURN_SEGMENT( + SPTEST.REGION_ID( 1 ), + SEGMENT_ADDRESS_1, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" ); + TEXT_IO.NEW_LINE; + -- SEGMENT_ADDRESS_1 := RTEMS.NULL_ADDRESS; + + TEXT_IO.PUT( + "TA1 - region_return_segment - return segment to region 1 - " + ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_2 ); + RTEMS.REGION.RETURN_SEGMENT( + SPTEST.REGION_ID( 1 ), + SEGMENT_ADDRESS_2, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" ); + TEXT_IO.NEW_LINE; + -- SEGMENT_ADDRESS_2 := RTEMS.NULL_ADDRESS; + + TEXT_IO.PUT( + "TA1 - region_return_segment - return segment to region 1 - " + ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_7 ); + RTEMS.REGION.RETURN_SEGMENT( + SPTEST.REGION_ID( 1 ), + SEGMENT_ADDRESS_7, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" ); + TEXT_IO.NEW_LINE; + -- SEGMENT_ADDRESS_7 := RTEMS.NULL_ADDRESS; + + TEXT_IO.PUT( + "TA1 - region_return_segment - return segment to region 1 - " + ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_6 ); + RTEMS.REGION.RETURN_SEGMENT( + SPTEST.REGION_ID( 1 ), + SEGMENT_ADDRESS_6, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" ); + TEXT_IO.NEW_LINE; + -- SEGMENT_ADDRESS_6 := RTEMS.NULL_ADDRESS; + + TEXT_IO.PUT( + "TA1 - region_return_segment - return segment to region 1 - " + ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_8 ); + RTEMS.REGION.RETURN_SEGMENT( + SPTEST.REGION_ID( 1 ), + SEGMENT_ADDRESS_8, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" ); + TEXT_IO.NEW_LINE; + -- SEGMENT_ADDRESS_8 := RTEMS.NULL_ADDRESS; + + TEXT_IO.PUT( + "TA1 - region_return_segment - return segment to region 1 - " + ); + SPTEST.PUT_ADDRESS_FROM_AREA_1( SEGMENT_ADDRESS_5 ); + RTEMS.REGION.RETURN_SEGMENT( + SPTEST.REGION_ID( 1 ), + SEGMENT_ADDRESS_5, + STATUS + ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_RETURN_SEGMENT" ); + TEXT_IO.NEW_LINE; + -- SEGMENT_ADDRESS_5 := RTEMS.NULL_ADDRESS; + + TEXT_IO.PUT_LINE( + "TA1 - region_delete - walks heap if debug enabled" + ); + RTEMS.REGION.DELETE( SPTEST.REGION_ID( 1 ), STATUS ); + TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "REGION_DELETE OF RN1" ); + + TEXT_IO.PUT_LINE( "*** END OF TEST 25 ***" ); + RTEMS.SHUTDOWN_EXECUTIVE( 0 ); + + end TASK_1; + +end SPTEST; diff --git a/testsuites/ada/sptests/sp25/sptest.ads b/testsuites/ada/sptests/sp25/sptest.ads new file mode 100644 index 0000000000..21c27a38db --- /dev/null +++ b/testsuites/ada/sptests/sp25/sptest.ads @@ -0,0 +1,103 @@ +-- +-- SPTEST / SPECIFICATION +-- +-- DESCRIPTION: +-- +-- This package is the specification for Test 25 of the RTEMS +-- Single Processor Test Suite. +-- +-- DEPENDENCIES: +-- +-- +-- +-- COPYRIGHT (c) 1989-2011. +-- On-Line Applications Research Corporation (OAR). +-- +-- The license and distribution terms for this file may in +-- the file LICENSE in this distribution or at +-- http://www.rtems.org/license/LICENSE. +-- + +with RTEMS; +with RTEMS.TASKS; + +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 .. 2 ) of RTEMS.ID; + TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME; + +-- +-- These arrays contain the IDs and NAMEs of all RTEMS regions created +-- by this test. +-- + + REGION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID; + REGION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME; + +-- +-- The following constant defines the priority of most of the +-- RTEMS tasks in this test. This allows one of the tasks to +-- easily set itself to a higher priority than the rest. +-- + + BASE_PRIORITY : constant RTEMS.TASKS.PRIORITY := 140; + +-- +-- These arrays define the memory areas used for the regions in +-- this test. +-- + + AREA_1 : array ( RTEMS.UNSIGNED32 range 0 .. 64000 ) of RTEMS.UNSIGNED8; + for AREA_1'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT; + +-- +-- INIT +-- +-- DESCRIPTION: +-- +-- This RTEMS task initializes the application. +-- + + procedure INIT ( + ARGUMENT : in RTEMS.TASKS.ARGUMENT + ); + pragma Convention (C, INIT); + +-- +-- PUT_ADDRESS_FROM_AREA_1 +-- +-- DESCRIPTION: +-- +-- This subprogram prints the offset of the address TO_BE_PRINTED +-- from the first byte of AREA_1. +-- +-- NOTE: +-- +-- This subprogram is used because the actual address of AREA_1 +-- varies based upon the size of the executable, the target board, +-- and the target processor. +-- + + procedure PUT_ADDRESS_FROM_AREA_1 ( + TO_BE_PRINTED : in RTEMS.ADDRESS + ); + +-- +-- TASK_1 +-- +-- DESCRIPTION: +-- +-- This RTEMS task tests the Region Manager. +-- + + procedure TASK_1 ( + ARGUMENT : in RTEMS.TASKS.ARGUMENT + ); + pragma Convention (C, TASK_1); + +end SPTEST; |