Initial revision

This commit is contained in:
Joel Sherrill
1995-05-11 17:39:37 +00:00
commit ac7d5ef06a
1683 changed files with 189788 additions and 0 deletions

71
testsuites/samples/README Normal file
View File

@@ -0,0 +1,71 @@
#
# 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 directory contains the RTEMS Sample Application Suite.
The tests in this directory perform two functions:
+ provide simple examples of applications which can be
used as a starting point for your application.
+ help test a new board support package
The hello and ticker applications are useful when first bringing up
a new board support package. The base_mp test is useful when
performing initial checkout on a new MPCI layer.
The following describes each of the sample applications:
base_mp
This is a very simple two node multiprocessor application. It consists
of a single initialization task on each node which print out
their respective node numbers and task IDs. This test can be
used as a simple test of a new MPCI layer because it minimizes
the number of packets sent by RTEMS.
This is intended as a starting point for custom developed multiprocessor
applications.
base_sp
This is a simple single processor application which consists of
an initialization task which creates another task.
This is intended as a starting point for custom developed single
processor applications.
cdtest
A very simple C++ application which demonstrates that it is
possible to use C++ contructors and destructors in an RTEMS
application. Also does a perfunctory iostream test.
hello
This is the RTEMS version of the classic hello world program.
It consists of single initialization task which prints out
a few messages.
This test does not include a Clock Tick device driver and can
be used to test the startup code of the board support package
as well as console output.
paranoia
A public domain test of the floating point and math library
capabilities of a toolset. It reports discrepancies between
actual and expected results. It is a large test.
ticker
This is a simple test of the user's Clock Tick device driver.
This test has an initialization task create three application
tasks which sleep and periodically wake up and print the time.

View File

@@ -0,0 +1,38 @@
/* Application_task
*
* This routine is as an example of an application task which
* prints a message including its RTEMS task id. This task
* then invokes exit to return to the monitor.
*
* Input parameters:
* node - processor's node number
*
* 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 "libcsupport.h"
rtems_task Application_task(
rtems_task_argument node
)
{
rtems_id tid;
rtems_status_code status;
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
printf( "This task was invoked with the node argument (%d)\n", node );
printf( "This task has the id of 0x%x\n", tid );
printf( "*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***\n" );
exit( 0 );
}

View File

@@ -0,0 +1,46 @@
/* Init
*
* This routine is the initialization task for this test program.
* It is called from init_exec 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 application, the current time might be
* set by this task.
*
* Input parameters: NONE
*
* 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 "shm.h"
#include "conftbl.h"
#include "gvar.h"
rtems_task Init(
rtems_task_argument argument
)
{
rtems_name task_name;
rtems_id tid;
rtems_status_code status;
printf( "\n\n*** SAMPLE MULTIPROCESSOR APPLICATION ***\n" );
printf( "Creating and starting an application task\n" );
task_name = rtems_build_name( 'T', 'A', '1', ' ' );
status = rtems_task_create( task_name, 1, 1024,
RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid );
status = rtems_task_start( tid, Application_task, Mp_conf_addr.node );
status = rtems_task_delete( RTEMS_SELF );
}

View File

@@ -0,0 +1,13 @@
#
# $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.
#

View File

@@ -0,0 +1,5 @@
*** SAMPLE MULTIPROCESSOR APPLICATION ***
Creating and starting an application task
This task was invoked with the node argument (1)
This task has the id of 0x10002
*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***

View File

@@ -0,0 +1,13 @@
#
# $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.
#

View File

@@ -0,0 +1,5 @@
*** SAMPLE MULTIPROCESSOR APPLICATION ***
Creating and starting an application task
This task was invoked with the node argument (2)
This task has the id of 0x20002
*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***

View File

@@ -0,0 +1,31 @@
/* 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 "stdio.h"
#include "libcsupport.h"
/* Miscellaneous */
#define EXTERN extern /* external definition */
/* macros */
/* structures */
#include "gvar.h"
/* end of include file */

View File

@@ -0,0 +1,39 @@
/* Application_task
*
* This routine is as an example of an application task which
* prints a message including its RTEMS task id. This task
* then invokes exit to return to the monitor.
*
* Input parameters: NONE
*
* 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 "libcsupport.h"
rtems_task Application_task(
rtems_task_argument argument
)
{
rtems_id tid;
rtems_status_code status;
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
printf( "Application task was invoked with argument (%d) "
"and has id of 0x%x\n", argument, tid );
printf( "*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***\n" );
exit( 0 );
}

View File

@@ -0,0 +1,13 @@
#
# $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.
#

View File

@@ -0,0 +1,5 @@
*** SAMPLE SINGLE PROCESSOR APPLICATION ***
Creating and starting an application task
Application task was invoked with argument (0) and has id of 0x10002
*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***

View File

@@ -0,0 +1,51 @@
/* Init
*
* This routine is the initialization task for this test program.
* It is called from init_exec 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 application, the current time might be
* set by this task.
*
* Input parameters: NONE
*
* 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"
#define ARGUMENT 0
rtems_task Init(
rtems_task_argument argument
)
{
rtems_name task_name;
rtems_id tid;
rtems_status_code status;
printf( "\n\n*** SAMPLE SINGLE PROCESSOR APPLICATION ***\n" );
printf( "Creating and starting an application task\n" );
task_name = rtems_build_name( 'T', 'A', '1', ' ' );
status = rtems_task_create( task_name, 1, 1024,
RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid );
status = rtems_task_start( tid, Application_task, ARGUMENT );
status = rtems_task_delete( RTEMS_SELF );
}

View File

@@ -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 "stdio.h"
/* Miscellaneous */
#define EXTERN extern /* external definition */
/* macros */
/* structures */
#include "gvar.h"
/* end of include file */

View File

@@ -0,0 +1,31 @@
Hey I'm in base class constructor number 1 for 0x400010cc.
Hey I'm in base class constructor number 2 for 0x400010d4.
Hey I'm in derived class constructor number 3 for 0x400010d4.
*** CONSTRUCTOR/DESTRUCTOR TEST ***
Hey I'm in base class constructor number 4 for 0x4009ee08.
Hey I'm in base class constructor number 5 for 0x4009ee10.
Hey I'm in base class constructor number 6 for 0x4009ee18.
Hey I'm in base class constructor number 7 for 0x4009ee20.
Hey I'm in derived class constructor number 8 for 0x4009ee20.
Testing a C++ I/O stream
Hey I'm in derived class destructor number 8 for 0x4009ee20.
Derived class - Instantiation order 8
Hey I'm in base class destructor number 7 for 0x4009ee20.
Instantiation order 8
Hey I'm in base class destructor number 6 for 0x4009ee18.
Instantiation order 6
Hey I'm in base class destructor number 5 for 0x4009ee10.
Instantiation order 5
Hey I'm in base class destructor number 4 for 0x4009ee08.
Instantiation order 5
*** END OF CONSTRUCTOR/DESTRUCTOR TEST ***
Hey I'm in derived class destructor number 3 for 0x400010d4.
Derived class - Instantiation order 3
Hey I'm in base class destructor number 2 for 0x400010d4.
Instantiation order 3
Hey I'm in base class destructor number 1 for 0x400010cc.
Instantiation order 1

View File

@@ -0,0 +1,30 @@
/* Init
*
* This routine is the initialization task for this test program.
* It is called from init_exec 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: NONE
*
* 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"
#include <stdio.h>
#include "libcsupport.h"

View File

@@ -0,0 +1,146 @@
/* main
*
* This routine is the initialization task for this test program.
* It is called from init_exec 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: NONE
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1994 by Division Incorporated
*
* Based in part on OAR works.
* To anyone who acknowledges that this file is provided "AS IS"
* without any express or implied warranty:
* permission to use, copy, modify, and distribute this file
* for any purpose is hereby granted without fee, provided that
* the above copyright notice and this notice appears in all
* copies, and that the name of Division Incorporated not be
* used in advertising or publicity pertaining to distribution
* of the software without specific, written prior permission.
* Division Incorporated makes no representations about the
* suitability of this software for any purpose.
*
* $Id$
*/
#include <rtems.h>
#include <stdio.h>
#include <libcsupport.h>
#include <iostream.h>
extern "C" {
extern rtems_task main_task(rtems_task_argument);
}
static int num_inst = 0;
class A {
public:
A(void)
{
num_inst++;
printf(
"Hey I'm in base class constructor number %d for %p.\n",
num_inst,
this
);
/*
* Make sure we use some space
*/
string = new char[50];
sprintf(string, "Instantiation order %d", num_inst);
};
virtual ~A()
{
printf(
"Hey I'm in base class destructor number %d for %p.\n",
num_inst,
this
);
print();
num_inst--;
};
virtual void print() { printf("%s\n", string); };
protected:
char *string;
};
class B : public A {
public:
B(void)
{
num_inst++;
printf(
"Hey I'm in derived class constructor number %d for %p.\n",
num_inst,
this
);
/*
* Make sure we use some space
*/
string = new char[50];
sprintf(string, "Instantiation order %d", num_inst);
};
~B()
{
printf(
"Hey I'm in derived class destructor number %d for %p.\n",
num_inst,
this
);
print();
num_inst--;
};
void print() { printf("Derived class - %s\n", string); }
};
A foo;
B foobar;
void
cdtest(void)
{
A bar, blech, blah;
B bleak;
cout << "Testing a C++ I/O stream" << endl;
bar = blech;
}
//
// main equivalent
// It can not be called 'main' since the bsp owns that name
// in many implementations in order to get global constructors
// run.
//
// Ref: c/src/lib/libbsp/hppa1_1/simhppa/startup/bspstart.c
//
rtems_task main_task(
rtems_task_argument ignored
)
{
printf( "\n\n*** CONSTRUCTOR/DESTRUCTOR TEST ***\n" );
cdtest();
printf( "*** END OF CONSTRUCTOR/DESTRUCTOR TEST ***\n\n\n" );
exit(0);
}

View File

@@ -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 "stdio.h"
/* Miscellaneous */
#define EXTERN extern /* external definition */
/* macros */
/* structures */
#include "gvar.h"
/* end of include file */

View File

@@ -0,0 +1,13 @@
#
# $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.
#

View File

@@ -0,0 +1,3 @@
*** HELLO WORLD TEST ***
Hello World
*** END OF HELLO WORLD TEST ***

View File

@@ -0,0 +1,41 @@
/* Init
*
* This routine is the initialization task for this test program.
* It is called from init_exec 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: NONE
*
* 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"
#include <stdio.h>
#include "libcsupport.h"
rtems_task Init(
rtems_task_argument ignored
)
{
printf( "\n\n*** HELLO WORLD TEST ***\n" );
printf( "Hello World\n" );
printf( "*** END OF HELLO WORLD TEST ***\n" );
exit( 0 );
}

View File

@@ -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 "stdio.h"
/* Miscellaneous */
#define EXTERN extern /* external definition */
/* macros */
/* structures */
#include "gvar.h"
/* end of include file */

View File

@@ -0,0 +1,43 @@
/* Init
*
* This routine is the initialization task for this test program.
* It is called from init_exec 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: NONE
*
* 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"
#include "libcsupport.h"
extern int paranoia(int, char **);
char *args[2] = { "paranoia", 0 };
rtems_task Init(
rtems_task_argument ignored
)
{
printf( "\n\n*** PARANOIA TEST ***\n" );
paranoia(1, args);
printf( "*** END OF PARANOIA TEST ***\n" );
exit( 0 );
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
#
# $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.
#

View File

@@ -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 "stdio.h"
/* Miscellaneous */
#define EXTERN extern /* external definition */
/* macros */
/* structures */
#include "gvar.h"
/* end of include file */

View File

@@ -0,0 +1,58 @@
/* Init
*
* This routine is the initialization task for this test program.
* It is called from init_exec 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: NONE
*
* 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;
rtems_time_of_day time;
puts( "\n\n*** CLOCK TICK TEST ***" );
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
status = rtems_clock_set( &time );
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', ' ' );
status = rtems_task_create( Task_name[ 1 ], 1, 1024, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ] );
status = rtems_task_create( Task_name[ 2 ], 1, 1024, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ] );
status = rtems_task_create( Task_name[ 3 ], 1, 1024, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ] );
status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
status = rtems_task_delete( RTEMS_SELF );
}

View File

@@ -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 */

View File

@@ -0,0 +1,44 @@
/* Test_task
*
* This routine serves as a test task. It verifies the basic task
* switching capabilities of the executive.
*
* Input parameters: NONE
*
* 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"
rtems_task Test_task(
rtems_task_argument unused
)
{
rtems_id tid;
rtems_time_of_day time;
rtems_unsigned32 task_index;
rtems_status_code status;
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
task_index = task_number( tid );
while( FOREVER ) {
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
if ( time.second >= 35 ) {
puts( "*** END OF CLOCK TICK TEST ***" );
exit( 0 );
}
put_name( Task_name[ task_index ], FALSE );
print_time( " - rtems_clock_get - ", &time, "\n" );
status = rtems_task_wake_after( task_index * 5 * TICKS_PER_SECOND );
}
}

View File

@@ -0,0 +1,13 @@
#
# $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.
#

View File

@@ -0,0 +1,16 @@
*** CLOCK TICK TEST ***
TA1 - tm_get - 09:00:00 12/31/1988
TA2 - tm_get - 09:00:00 12/31/1988
TA3 - tm_get - 09:00:00 12/31/1988
TA1 - tm_get - 09:00:05 12/31/1988
TA1 - tm_get - 09:00:10 12/31/1988
TA2 - tm_get - 09:00:10 12/31/1988
TA1 - tm_get - 09:00:15 12/31/1988
TA3 - tm_get - 09:00:15 12/31/1988
TA1 - tm_get - 09:00:20 12/31/1988
TA2 - tm_get - 09:00:20 12/31/1988
TA1 - tm_get - 09:00:25 12/31/1988
TA1 - tm_get - 09:00:30 12/31/1988
TA2 - tm_get - 09:00:30 12/31/1988
TA3 - tm_get - 09:00:30 12/31/1988
*** END OF CLOCK TICK TEST ***