summaryrefslogtreecommitdiffstats
path: root/c/src/tests/sptests/sp19
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/tests/sptests/sp19')
-rw-r--r--c/src/tests/sptests/sp19/first.c66
-rw-r--r--c/src/tests/sptests/sp19/fptask.c98
-rw-r--r--c/src/tests/sptests/sp19/fptest.h165
-rw-r--r--c/src/tests/sptests/sp19/init.c153
-rw-r--r--c/src/tests/sptests/sp19/inttest.h149
-rw-r--r--c/src/tests/sptests/sp19/sp19.doc23
-rw-r--r--c/src/tests/sptests/sp19/sp19.scn55
-rw-r--r--c/src/tests/sptests/sp19/system.h30
-rw-r--r--c/src/tests/sptests/sp19/task1.c59
9 files changed, 798 insertions, 0 deletions
diff --git a/c/src/tests/sptests/sp19/first.c b/c/src/tests/sptests/sp19/first.c
new file mode 100644
index 0000000000..94bdedd5ad
--- /dev/null
+++ b/c/src/tests/sptests/sp19/first.c
@@ -0,0 +1,66 @@
+/* First_FP_task
+ *
+ * This routine serves as a floating point test task. It verifies the
+ * basic task switching capabilities of the executive when floating
+ * point is configured.
+ *
+ * Input parameters:
+ * argument - task argument
+ *
+ * Output parameters: NONE
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#include "system.h"
+#include "fptest.h"
+#include "inttest.h"
+
+rtems_task First_FP_task(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+ rtems_id tid;
+ rtems_time_of_day time;
+ rtems_unsigned32 task_index;
+ INTEGER_DECLARE;
+ FP_DECLARE;
+
+ status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ directive_failed( status, "rtems_task_ident" );
+
+ task_index = task_number( tid );
+
+ INTEGER_LOAD( INTEGER_factors[ task_index ] );
+ FP_LOAD( FP_factors[ task_index ] );
+
+ put_name( Task_name[ task_index ], FALSE );
+ printf( " - integer base = (0x%x)\n", INTEGER_factors[ task_index ] );
+ put_name( Task_name[ task_index ], FALSE );
+#if ( RTEMS_HAS_HARDWARE_FP == 1 )
+ printf( " - float base = (%g)\n", FP_factors[ task_index ] );
+#else
+ printf( " - float base = (NA)\n" );
+#endif
+
+ if ( argument == 0 ) {
+ status = rtems_task_restart( RTEMS_SELF, 1 );
+ directive_failed( status, "rtems_task_restart of RTEMS_SELF" );
+ } else {
+ build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
+ status = rtems_clock_set( &time );
+ directive_failed( status, "rtems_clock_set" );
+
+ status = rtems_task_delete( RTEMS_SELF );
+ directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
+ }
+}
diff --git a/c/src/tests/sptests/sp19/fptask.c b/c/src/tests/sptests/sp19/fptask.c
new file mode 100644
index 0000000000..b8e881e6cd
--- /dev/null
+++ b/c/src/tests/sptests/sp19/fptask.c
@@ -0,0 +1,98 @@
+/* FP_task
+ *
+ * This routine serves as a floating point test task. It verifies the
+ * basic task switching capabilities of the executive when floating
+ * point is configured.
+ *
+ * Input parameters:
+ * argument - task argument
+ *
+ * Output parameters: NONE
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#include "system.h"
+#include "fptest.h"
+#include "inttest.h"
+
+rtems_task FP_task(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+ rtems_id tid;
+ rtems_time_of_day time;
+ rtems_unsigned32 task_index;
+ rtems_unsigned32 previous_seconds;
+ INTEGER_DECLARE;
+ FP_DECLARE;
+
+ status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ directive_failed( status, "rtems_task_ident of self" );
+
+ task_index = task_number( tid );
+
+ INTEGER_LOAD( INTEGER_factors[ task_index ] );
+ FP_LOAD( FP_factors[ task_index ] );
+
+ put_name( Task_name[ task_index ], FALSE );
+ printf( " - integer base = (0x%x)\n", INTEGER_factors[ task_index ] );
+ put_name( Task_name[ task_index ], FALSE );
+#if ( RTEMS_HAS_HARDWARE_FP == 1 )
+ printf( " - float base = (%g)\n", FP_factors[ task_index ] );
+#else
+ printf( " - float base = (NA)\n" );
+#endif
+
+ previous_seconds = -1;
+
+ while( FOREVER ) {
+
+ status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
+ directive_failed( status, "rtems_clock_get" );
+
+ if ( time.second >= 16 ) {
+
+ if ( task_number( tid ) == 4 ) {
+ puts( "TA4 - rtems_task_delete - self" );
+ status = rtems_task_delete( RTEMS_SELF );
+ directive_failed( status, "rtems_task_delete of TA4" );
+ }
+ puts( "TA5 - rtems_task_delete - TA3" );
+ status = rtems_task_delete( Task_id[ 3 ] );
+ directive_failed( status, "rtems_task_delete of TA3" );
+
+ puts( "*** END OF TEST 19 *** " );
+ exit( 0 );
+ }
+
+ if (previous_seconds != time.second)
+ {
+ put_name( Task_name[ task_index ], FALSE );
+ print_time( " - rtems_clock_get - ", &time, "\n" );
+ previous_seconds = time.second;
+ }
+
+ INTEGER_CHECK( INTEGER_factors[ task_index ] );
+ FP_CHECK( FP_factors[ task_index ] );
+
+ /* for the first 4 seconds we spin as fast as possible
+ * so that we likely are interrupted
+ * After that, we go to sleep for a second at a time
+ */
+ if (time.second >= 4)
+ {
+ status = rtems_task_wake_after( TICKS_PER_SECOND );
+ directive_failed( status, "rtems_task_wake_after" );
+ }
+ }
+}
diff --git a/c/src/tests/sptests/sp19/fptest.h b/c/src/tests/sptests/sp19/fptest.h
new file mode 100644
index 0000000000..a8f3a925cb
--- /dev/null
+++ b/c/src/tests/sptests/sp19/fptest.h
@@ -0,0 +1,165 @@
+/* fptest.h
+ *
+ * This include file contains the CPU dependent implementation
+ * of the following routines needed to test RTEMS floating
+ * point support:
+ * FP_load( &context )
+ * FP_check( &context )
+ *
+ * FP_load - loads the specified floating point context
+ * FP_check - checks the specified floating point context
+ *
+ * NOTE: These routines are VERY CPU dependent and are thus
+ * located in in the CPU dependent include file
+ * fptest.h. These routines form the core of the
+ * floating point context switch test.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+
+#ifndef __FPTEST_h
+#define __FPTEST_h
+
+#include <stdio.h>
+
+#ifndef RTEMS_HAS_HARDWARE_FP
+#error "This CPU does not have RTEMS_HAS_HARDWARE_FP defined"
+#endif
+
+#if ( RTEMS_HAS_HARDWARE_FP == FALSE )
+
+#define FP_DECLARE ;
+#define FP_LOAD( _factor )
+#define FP_CHECK( _factor ) 0
+
+#else
+
+#define FP_DECLARE \
+ double fp01 = 1.0; \
+ double fp02 = 2.0; \
+ double fp03 = 3.0; \
+ double fp04 = 4.0; \
+ double fp05 = 5.0; \
+ double fp06 = 6.0; \
+ double fp07 = 7.0; \
+ double fp08 = 8.0; \
+ double fp09 = 9.0; \
+ double fp10 = 10.0; \
+ double fp11 = 11.0; \
+ double fp12 = 12.0; \
+ double fp13 = 13.0; \
+ double fp14 = 14.0; \
+ double fp15 = 15.0; \
+ double fp16 = 16.0; \
+ double fp17 = 17.0; \
+ double fp18 = 18.0; \
+ double fp19 = 19.0; \
+ double fp20 = 20.0; \
+ double fp21 = 21.0; \
+ double fp22 = 22.0; \
+ double fp23 = 23.0; \
+ double fp24 = 24.0; \
+ double fp25 = 25.0; \
+ double fp26 = 26.0; \
+ double fp27 = 27.0; \
+ double fp28 = 28.0; \
+ double fp29 = 29.0; \
+ double fp30 = 30.0; \
+ double fp31 = 31.0; \
+ double fp32 = 32.0
+
+#define FP_LOAD( _factor ) \
+ do { \
+ fp01 += _factor; \
+ fp02 += _factor; \
+ fp03 += _factor; \
+ fp04 += _factor; \
+ fp05 += _factor; \
+ fp06 += _factor; \
+ fp07 += _factor; \
+ fp08 += _factor; \
+ fp09 += _factor; \
+ fp10 += _factor; \
+ fp11 += _factor; \
+ fp12 += _factor; \
+ fp13 += _factor; \
+ fp14 += _factor; \
+ fp15 += _factor; \
+ fp16 += _factor; \
+ fp17 += _factor; \
+ fp18 += _factor; \
+ fp19 += _factor; \
+ fp20 += _factor; \
+ fp21 += _factor; \
+ fp22 += _factor; \
+ fp23 += _factor; \
+ fp24 += _factor; \
+ fp25 += _factor; \
+ fp26 += _factor; \
+ fp27 += _factor; \
+ fp28 += _factor; \
+ fp29 += _factor; \
+ fp30 += _factor; \
+ fp31 += _factor; \
+ fp32 += _factor; \
+ } while (0)
+
+#define EPSILON (0.0005)
+#define FPABS(d) (((d) < 0.0) ? -(d) : (d))
+#define FPNEQ(a,b) (FPABS((a)-(b)) > EPSILON)
+
+#define FP_CHECK_ONE( _v, _base, _factor ) \
+ if ( FPNEQ( (_v), ((_base) + (_factor)) ) ) { \
+ printf("%d: " #_v " wrong -- (%g not %g)\n", \
+ task_index, (_v), (_base + _factor)); \
+ }
+
+
+#define FP_CHECK( _factor ) \
+ do { \
+ FP_CHECK_ONE( fp01, 1.0, (_factor) ); \
+ FP_CHECK_ONE( fp02, 2.0, (_factor) ); \
+ FP_CHECK_ONE( fp03, 3.0, (_factor) ); \
+ FP_CHECK_ONE( fp04, 4.0, (_factor) ); \
+ FP_CHECK_ONE( fp05, 5.0, (_factor) ); \
+ FP_CHECK_ONE( fp06, 6.0, (_factor) ); \
+ FP_CHECK_ONE( fp07, 7.0, (_factor) ); \
+ FP_CHECK_ONE( fp08, 8.0, (_factor) ); \
+ FP_CHECK_ONE( fp09, 9.0, (_factor) ); \
+ FP_CHECK_ONE( fp10, 10.0, (_factor) ); \
+ FP_CHECK_ONE( fp11, 11.0, (_factor) ); \
+ FP_CHECK_ONE( fp12, 12.0, (_factor) ); \
+ FP_CHECK_ONE( fp13, 13.0, (_factor) ); \
+ FP_CHECK_ONE( fp14, 14.0, (_factor) ); \
+ FP_CHECK_ONE( fp15, 15.0, (_factor) ); \
+ FP_CHECK_ONE( fp16, 16.0, (_factor) ); \
+ FP_CHECK_ONE( fp17, 17.0, (_factor) ); \
+ FP_CHECK_ONE( fp18, 18.0, (_factor) ); \
+ FP_CHECK_ONE( fp19, 19.0, (_factor) ); \
+ FP_CHECK_ONE( fp20, 20.0, (_factor) ); \
+ FP_CHECK_ONE( fp21, 21.0, (_factor) ); \
+ FP_CHECK_ONE( fp22, 22.0, (_factor) ); \
+ FP_CHECK_ONE( fp23, 23.0, (_factor) ); \
+ FP_CHECK_ONE( fp24, 24.0, (_factor) ); \
+ FP_CHECK_ONE( fp25, 25.0, (_factor) ); \
+ FP_CHECK_ONE( fp26, 26.0, (_factor) ); \
+ FP_CHECK_ONE( fp27, 27.0, (_factor) ); \
+ FP_CHECK_ONE( fp28, 28.0, (_factor) ); \
+ FP_CHECK_ONE( fp29, 29.0, (_factor) ); \
+ FP_CHECK_ONE( fp30, 30.0, (_factor) ); \
+ FP_CHECK_ONE( fp31, 31.0, (_factor) ); \
+ FP_CHECK_ONE( fp32, 32.0, (_factor) ); \
+ } while (0)
+
+#endif
+
+#endif
diff --git a/c/src/tests/sptests/sp19/init.c b/c/src/tests/sptests/sp19/init.c
new file mode 100644
index 0000000000..477ec4ef43
--- /dev/null
+++ b/c/src/tests/sptests/sp19/init.c
@@ -0,0 +1,153 @@
+/* Init
+ *
+ * This routine is the initialization task for this test program.
+ * It is a user initialization task and has the responsibility for creating
+ * and starting the tasks that make up the test. If the time of day
+ * clock is required for the test, it should also be set to a known
+ * value by this function.
+ *
+ * Input parameters:
+ * argument - task argument
+ *
+ * Output parameters: NONE
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#include "system.h"
+#undef EXTERN
+#define EXTERN
+#include "conftbl.h"
+#include "gvar.h"
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+
+ puts( "\n\n*** TEST 19 ***" );
+
+ Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
+ Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
+ Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
+ Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' );
+ Task_name[ 5 ] = rtems_build_name( 'T', 'A', '5', ' ' );
+ Task_name[ 6 ] = rtems_build_name( 'F', 'P', '1', ' ' );
+
+ status = rtems_task_create(
+ Task_name[ 1 ],
+ 2,
+ 2048,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_FLOATING_POINT,
+ &Task_id[ 1 ]
+ );
+ directive_failed( status, "rtems_task_create of TA1" );
+
+ status = rtems_task_create(
+ Task_name[ 2 ],
+ 2,
+ 2048,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &Task_id[ 2 ]
+ );
+ directive_failed( status, "rtems_task_create of TA2" );
+
+ status = rtems_task_create(
+ Task_name[ 3 ],
+ 2,
+ 2048,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &Task_id[ 3 ]
+ );
+ directive_failed( status, "rtems_task_create of TA3" );
+
+ status = rtems_task_create(
+ Task_name[ 4 ],
+ 2,
+ 2048,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_FLOATING_POINT,
+ &Task_id[ 4 ]
+ );
+ directive_failed( status, "rtems_task_create of TA4" );
+
+ status = rtems_task_create(
+ Task_name[ 5 ],
+ 2,
+ 2048,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_FLOATING_POINT,
+ &Task_id[ 5 ]
+ );
+ directive_failed( status, "rtems_task_create of TA5" );
+
+ status = rtems_task_create(
+ Task_name[ 6 ],
+ 1,
+ 2048,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_FLOATING_POINT,
+ &Task_id[ 6 ]
+ );
+ directive_failed( status, "rtems_task_create of FP1" );
+
+ status = rtems_task_start( Task_id[ 6 ], First_FP_task, 0 );
+ directive_failed( status, "rtems_task_start of FP1" );
+
+ status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
+ directive_failed( status, "rtems_task_start of TA1" );
+
+ status = rtems_task_start( Task_id[ 2 ], Task_1, 0 );
+ directive_failed( status, "rtems_task_start of TA2" );
+
+ status = rtems_task_start( Task_id[ 3 ], Task_1, 0 );
+ directive_failed( status, "rtems_task_start of TA3" );
+
+ status = rtems_task_start( Task_id[ 4 ], FP_task, 0 );
+ directive_failed( status, "rtems_task_start of TA4" );
+
+ status = rtems_task_start( Task_id[ 5 ], FP_task, 0 );
+ directive_failed( status, "rtems_task_create of TA5" );
+
+ /*
+ * Load "task dependent factors" in the context areas
+ */
+
+
+ FP_factors[0] = 0.0;
+ FP_factors[1] = 1000.1;
+ FP_factors[2] = 2000.2;
+ FP_factors[3] = 3000.3;
+ FP_factors[4] = 4000.4;
+ FP_factors[5] = 5000.5;
+ FP_factors[6] = 6000.6;
+ FP_factors[7] = 7000.7;
+ FP_factors[8] = 8000.8;
+ FP_factors[9] = 9000.9;
+
+ INTEGER_factors[0] = 0x0000;
+ INTEGER_factors[1] = 0x1000;
+ INTEGER_factors[2] = 0x2000;
+ INTEGER_factors[3] = 0x3000;
+ INTEGER_factors[4] = 0x4000;
+ INTEGER_factors[5] = 0x5000;
+ INTEGER_factors[6] = 0x6000;
+ INTEGER_factors[7] = 0x7000;
+ INTEGER_factors[8] = 0x8000;
+ INTEGER_factors[9] = 0x9000;
+
+ status = rtems_task_delete( RTEMS_SELF );
+ directive_failed( status, "rtems_task_delete of TA1" );
+}
diff --git a/c/src/tests/sptests/sp19/inttest.h b/c/src/tests/sptests/sp19/inttest.h
new file mode 100644
index 0000000000..5dfb0af636
--- /dev/null
+++ b/c/src/tests/sptests/sp19/inttest.h
@@ -0,0 +1,149 @@
+/* inttest.h
+ *
+ * XXX: ???
+ * This include file contains the CPU dependent implementation
+ * of the following routines needed to test RTEMS floating
+ * point support:
+ * INTEGER_load( &context )
+ * INTEGER_check( &context )
+ *
+ * INTEGER_load - loads the specified floating point context
+ * INTEGER_check - checks the specified floating point context
+ *
+ * NOTE: These routines are VERY CPU dependent and are thus
+ * located in in the CPU dependent include file
+ * inttest.h. These routines form the core of the
+ * floating point context switch test.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+
+#ifndef __INTEGER_TEST_h
+#define __INTEGER_TEST_h
+
+#include <stdio.h>
+#define REG_VARIABLE rtems_unsigned32
+
+#define INTEGER_DECLARE \
+ REG_VARIABLE int01 = 1; \
+ REG_VARIABLE int02 = 2; \
+ REG_VARIABLE int03 = 3; \
+ REG_VARIABLE int04 = 4; \
+ REG_VARIABLE int05 = 5; \
+ REG_VARIABLE int06 = 6; \
+ REG_VARIABLE int07 = 7; \
+ REG_VARIABLE int08 = 8; \
+ REG_VARIABLE int09 = 9; \
+ REG_VARIABLE int10 = 10; \
+ REG_VARIABLE int11 = 11; \
+ REG_VARIABLE int12 = 12; \
+ REG_VARIABLE int13 = 13; \
+ REG_VARIABLE int14 = 14; \
+ REG_VARIABLE int15 = 15; \
+ REG_VARIABLE int16 = 16; \
+ REG_VARIABLE int17 = 17; \
+ REG_VARIABLE int18 = 18; \
+ REG_VARIABLE int19 = 19; \
+ REG_VARIABLE int20 = 20; \
+ REG_VARIABLE int21 = 21; \
+ REG_VARIABLE int22 = 22; \
+ REG_VARIABLE int23 = 23; \
+ REG_VARIABLE int24 = 24; \
+ REG_VARIABLE int25 = 25; \
+ REG_VARIABLE int26 = 26; \
+ REG_VARIABLE int27 = 27; \
+ REG_VARIABLE int28 = 28; \
+ REG_VARIABLE int29 = 29; \
+ REG_VARIABLE int30 = 30; \
+ REG_VARIABLE int31 = 31; \
+ REG_VARIABLE int32 = 32
+
+#define INTEGER_LOAD( _factor ) \
+ do { \
+ int01 += _factor; \
+ int02 += _factor; \
+ int03 += _factor; \
+ int04 += _factor; \
+ int05 += _factor; \
+ int06 += _factor; \
+ int07 += _factor; \
+ int08 += _factor; \
+ int09 += _factor; \
+ int10 += _factor; \
+ int11 += _factor; \
+ int12 += _factor; \
+ int13 += _factor; \
+ int14 += _factor; \
+ int15 += _factor; \
+ int16 += _factor; \
+ int17 += _factor; \
+ int18 += _factor; \
+ int19 += _factor; \
+ int20 += _factor; \
+ int21 += _factor; \
+ int22 += _factor; \
+ int23 += _factor; \
+ int24 += _factor; \
+ int25 += _factor; \
+ int26 += _factor; \
+ int27 += _factor; \
+ int28 += _factor; \
+ int29 += _factor; \
+ int30 += _factor; \
+ int31 += _factor; \
+ int32 += _factor; \
+ } while (0)
+
+#define INTEGER_CHECK_ONE( _v, _base, _factor ) \
+ if ( (_v) != ((_base) + (_factor)) ) { \
+ printf("%d: " #_v " wrong -- (0x%x not 0x%x)\n", \
+ task_index, (_v), (_base + _factor)); \
+ }
+
+
+#define INTEGER_CHECK( _factor ) \
+ do { \
+ INTEGER_CHECK_ONE( int01, 1, (_factor) ); \
+ INTEGER_CHECK_ONE( int02, 2, (_factor) ); \
+ INTEGER_CHECK_ONE( int03, 3, (_factor) ); \
+ INTEGER_CHECK_ONE( int04, 4, (_factor) ); \
+ INTEGER_CHECK_ONE( int05, 5, (_factor) ); \
+ INTEGER_CHECK_ONE( int06, 6, (_factor) ); \
+ INTEGER_CHECK_ONE( int07, 7, (_factor) ); \
+ INTEGER_CHECK_ONE( int08, 8, (_factor) ); \
+ INTEGER_CHECK_ONE( int09, 9, (_factor) ); \
+ INTEGER_CHECK_ONE( int10, 10, (_factor) ); \
+ INTEGER_CHECK_ONE( int11, 11, (_factor) ); \
+ INTEGER_CHECK_ONE( int12, 12, (_factor) ); \
+ INTEGER_CHECK_ONE( int13, 13, (_factor) ); \
+ INTEGER_CHECK_ONE( int14, 14, (_factor) ); \
+ INTEGER_CHECK_ONE( int15, 15, (_factor) ); \
+ INTEGER_CHECK_ONE( int16, 16, (_factor) ); \
+ INTEGER_CHECK_ONE( int17, 17, (_factor) ); \
+ INTEGER_CHECK_ONE( int18, 18, (_factor) ); \
+ INTEGER_CHECK_ONE( int19, 19, (_factor) ); \
+ INTEGER_CHECK_ONE( int20, 20, (_factor) ); \
+ INTEGER_CHECK_ONE( int21, 21, (_factor) ); \
+ INTEGER_CHECK_ONE( int22, 22, (_factor) ); \
+ INTEGER_CHECK_ONE( int23, 23, (_factor) ); \
+ INTEGER_CHECK_ONE( int24, 24, (_factor) ); \
+ INTEGER_CHECK_ONE( int25, 25, (_factor) ); \
+ INTEGER_CHECK_ONE( int26, 26, (_factor) ); \
+ INTEGER_CHECK_ONE( int27, 27, (_factor) ); \
+ INTEGER_CHECK_ONE( int28, 28, (_factor) ); \
+ INTEGER_CHECK_ONE( int29, 29, (_factor) ); \
+ INTEGER_CHECK_ONE( int30, 30, (_factor) ); \
+ INTEGER_CHECK_ONE( int31, 31, (_factor) ); \
+ INTEGER_CHECK_ONE( int32, 32, (_factor) ); \
+ } while (0)
+
+#endif
diff --git a/c/src/tests/sptests/sp19/sp19.doc b/c/src/tests/sptests/sp19/sp19.doc
new file mode 100644
index 0000000000..78ac463c9f
--- /dev/null
+++ b/c/src/tests/sptests/sp19/sp19.doc
@@ -0,0 +1,23 @@
+#
+# $Id$
+#
+# COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+# On-Line Applications Research Corporation (OAR).
+# All rights assigned to U.S. Government, 1994.
+#
+# This material may be reproduced by or for the U.S. Government pursuant
+# to the copyright license under the clause at DFARS 252.227-7013. This
+# notice must appear in all copies of this file and its derivatives.
+#
+
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: test19
+
+directives:
+
+concepts:
+
+ a. Verifies system can dispatch a mixture of floating point and
+ non-floating point tasks.
diff --git a/c/src/tests/sptests/sp19/sp19.scn b/c/src/tests/sptests/sp19/sp19.scn
new file mode 100644
index 0000000000..76ded9f7d0
--- /dev/null
+++ b/c/src/tests/sptests/sp19/sp19.scn
@@ -0,0 +1,55 @@
+*** TEST 19 ***
+FP1 - integer base = (0x6000)
+FP1 - float base = (6000.6)
+FP1 - integer base = (0x6000)
+FP1 - float base = (6000.6)
+TA1 - integer base = (0x1000)
+TA1 - rtems_clock_get - 09:00:00 12/31/1988
+TA2 - integer base = (0x2000)
+TA2 - rtems_clock_get - 09:00:00 12/31/1988
+TA3 - integer base = (0x3000)
+TA3 - rtems_clock_get - 09:00:00 12/31/1988
+TA4 - integer base = (0x4000)
+TA4 - float base = (4000.4)
+TA4 - rtems_clock_get - 09:00:00 12/31/1988
+TA5 - integer base = (0x5000)
+TA5 - float base = (5000.5)
+TA5 - rtems_clock_get - 09:00:00 12/31/1988
+TA4 - rtems_clock_get - 09:00:01 12/31/1988
+TA5 - rtems_clock_get - 09:00:01 12/31/1988
+TA4 - rtems_clock_get - 09:00:02 12/31/1988
+TA5 - rtems_clock_get - 09:00:02 12/31/1988
+TA4 - rtems_clock_get - 09:00:03 12/31/1988
+TA5 - rtems_clock_get - 09:00:03 12/31/1988
+TA4 - rtems_clock_get - 09:00:04 12/31/1988
+TA5 - rtems_clock_get - 09:00:04 12/31/1988
+TA1 - rtems_clock_get - 09:00:05 12/31/1988
+TA4 - rtems_clock_get - 09:00:05 12/31/1988
+TA5 - rtems_clock_get - 09:00:05 12/31/1988
+TA4 - rtems_clock_get - 09:00:06 12/31/1988
+TA5 - rtems_clock_get - 09:00:06 12/31/1988
+TA4 - rtems_clock_get - 09:00:07 12/31/1988
+TA5 - rtems_clock_get - 09:00:07 12/31/1988
+TA4 - rtems_clock_get - 09:00:08 12/31/1988
+TA5 - rtems_clock_get - 09:00:08 12/31/1988
+TA4 - rtems_clock_get - 09:00:09 12/31/1988
+TA5 - rtems_clock_get - 09:00:09 12/31/1988
+TA1 - rtems_clock_get - 09:00:10 12/31/1988
+TA2 - rtems_clock_get - 09:00:10 12/31/1988
+TA4 - rtems_clock_get - 09:00:10 12/31/1988
+TA5 - rtems_clock_get - 09:00:10 12/31/1988
+TA4 - rtems_clock_get - 09:00:11 12/31/1988
+TA5 - rtems_clock_get - 09:00:11 12/31/1988
+TA4 - rtems_clock_get - 09:00:12 12/31/1988
+TA5 - rtems_clock_get - 09:00:12 12/31/1988
+TA4 - rtems_clock_get - 09:00:13 12/31/1988
+TA5 - rtems_clock_get - 09:00:13 12/31/1988
+TA4 - rtems_clock_get - 09:00:14 12/31/1988
+TA5 - rtems_clock_get - 09:00:14 12/31/1988
+TA1 - rtems_clock_get - 09:00:15 12/31/1988
+TA3 - rtems_clock_get - 09:00:15 12/31/1988
+TA4 - rtems_clock_get - 09:00:15 12/31/1988
+TA5 - rtems_clock_get - 09:00:15 12/31/1988
+TA4 - rtems_task_delete - self
+TA5 - rtems_task_delete - TA3
+*** END OF TEST 19 ***
diff --git a/c/src/tests/sptests/sp19/system.h b/c/src/tests/sptests/sp19/system.h
new file mode 100644
index 0000000000..aa2c6d17e4
--- /dev/null
+++ b/c/src/tests/sptests/sp19/system.h
@@ -0,0 +1,30 @@
+/* system.h
+ *
+ * This include file contains information that is included in every
+ * function in the test set.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#include <rtems.h>
+#include "tmacros.h"
+
+/* Miscellaneous */
+
+#define EXTERN extern /* external definition */
+
+/* macros */
+
+/* structures */
+
+#include "gvar.h"
+
+/* end of include file */
diff --git a/c/src/tests/sptests/sp19/task1.c b/c/src/tests/sptests/sp19/task1.c
new file mode 100644
index 0000000000..874fbcc614
--- /dev/null
+++ b/c/src/tests/sptests/sp19/task1.c
@@ -0,0 +1,59 @@
+/* Task_1
+ *
+ * This routine serves as a test task. It verifies the basic task
+ * switching capabilities of the executive.
+ *
+ * Input parameters:
+ * argument - task argument
+ *
+ * Output parameters: NONE
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#include "system.h"
+#include "inttest.h"
+
+rtems_task Task_1(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+ rtems_id tid;
+ rtems_time_of_day time;
+ rtems_unsigned32 task_index;
+ INTEGER_DECLARE;
+
+ status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ directive_failed( status, "rtems_task_ident" );
+
+ task_index = task_number( tid );
+
+ INTEGER_LOAD( INTEGER_factors[ task_index ] );
+
+ put_name( Task_name[ task_index ], FALSE );
+ printf( " - integer base = (0x%x)\n", INTEGER_factors[ task_index ] );
+
+ while( FOREVER ) {
+ status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
+ directive_failed( status, "rtems_clock_get" );
+
+ put_name( Task_name[ task_number( tid ) ], FALSE );
+ print_time( " - rtems_clock_get - ", &time, "\n" );
+
+ INTEGER_CHECK( INTEGER_factors[ task_index ] );
+
+ status = rtems_task_wake_after(
+ ( task_number( tid ) ) * 5 * TICKS_PER_SECOND
+ );
+ directive_failed( status, "rtems_task_wake_after" );
+ }
+}