mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
Remove (Abandoned)
This commit is contained in:
1 parent
bce989a942
commit
62812daba8
79 files changed
-4413
No files matched your search
@@ -1,14 +0,0 @@
|
||||
aclocal.m4
|
||||
autom4te*.cache
|
||||
config.cache
|
||||
config.guess
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
Makefile
|
||||
Makefile.in
|
||||
missing
|
||||
mkinstalldirs
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,11 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../aclocal
|
||||
|
||||
SUBDIRS = itronhello itrontask01 itrontask02 itrontask03 itrontask04 \
|
||||
itronmbf01 itronmbox01 itronsem01 itrontime01
|
||||
|
||||
include $(top_srcdir)/../automake/subdirs.am
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,6 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
This directory contains the functionality tests for the ITRON 3.0 API
|
||||
implementation.
|
||||
@@ -1,39 +0,0 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
##
|
||||
## $Id$
|
||||
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT([rtems-c-src-tests-itrontests],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
|
||||
AC_CONFIG_SRCDIR([itronhello])
|
||||
RTEMS_TOP([../..],[..])
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
|
||||
AM_INIT_AUTOMAKE([no-define foreign 1.10])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
|
||||
RTEMS_ENV_RTEMSBSP
|
||||
|
||||
RTEMS_PROJECT_ROOT
|
||||
|
||||
RTEMS_PROG_CC_FOR_TARGET
|
||||
|
||||
RTEMS_CANONICALIZE_TOOLS
|
||||
|
||||
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
|
||||
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile
|
||||
itronhello/Makefile
|
||||
itronmbf01/Makefile
|
||||
itronmbox01/Makefile
|
||||
itronsem01/Makefile
|
||||
itrontask01/Makefile
|
||||
itrontask02/Makefile
|
||||
itrontask03/Makefile
|
||||
itrontask04/Makefile
|
||||
itrontime01/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,28 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = itronhello
|
||||
itronhello_SOURCES = init.c system.h
|
||||
|
||||
dist_rtems_tests_DATA = itronhello.scn
|
||||
dist_rtems_tests_DATA += itronhello.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
itronhello_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(itronhello_OBJECTS) $(itronhello_LDADD)
|
||||
LINK_LIBS = $(itronhello_LDLIBS)
|
||||
|
||||
itronhello$(EXEEXT): $(itronhello_OBJECTS) $(itronhello_DEPENDENCIES)
|
||||
@rm -f itronhello$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,33 +0,0 @@
|
||||
/* 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-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
printf( "\n\n*** ITRON HELLO WORLD TEST ***\n" );
|
||||
printf( "Hello World\n" );
|
||||
printf( "*** END OF ITRON HELLO WORLD TEST ***\n" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.com/license/LICENSE.
|
||||
#
|
||||
|
||||
This file describes the directives and concepts tested by this test set.
|
||||
|
||||
test set name: itronhello
|
||||
|
||||
directives:
|
||||
cre_tsk, sta_tsk
|
||||
|
||||
concepts:
|
||||
|
||||
a. Verifies the initial itron task can be created and started.
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
*** ITRON HELLO WORLD TEST ***
|
||||
Hello World
|
||||
*** END OF ITRON HELLO WORLD TEST ***
|
||||
@@ -1,41 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include <rtems/itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
/* NOTICE: the clock driver is explicitly disabled */
|
||||
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,28 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = itronmbf01
|
||||
itronmbf01_SOURCES = init.c system.h
|
||||
|
||||
dist_rtems_tests_DATA = itronmbf01.scn
|
||||
dist_rtems_tests_DATA += itronmbf01.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
itronmbf01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(itronmbf01_OBJECTS) $(itronmbf01_LDADD)
|
||||
LINK_LIBS = $(itronmbf01_LDLIBS)
|
||||
|
||||
itronmbf01$(EXEEXT): $(itronmbf01_OBJECTS) $(itronmbf01_DEPENDENCIES)
|
||||
@rm -f itronmbf01$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,12 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.com/license/LICENSE.
|
||||
#
|
||||
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
*** ITRONMBF01 -- ITRON MESSAGE BUFFER TEST ***
|
||||
Init - cre_mbf - NULL pk_cmbf returns E_PAR
|
||||
Init - cre_mbf - negative values for bufsz returns E_PAR
|
||||
Init - cre_mbf - negative values for maxmsz returns E_PAR
|
||||
Init - cre_mbf - bufsz < maxmsz returns E_PAR
|
||||
Init - cre_mbf - bad id (less than -4) - E_OACV
|
||||
Init - cre_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - cre_mbf - bad id (0) - E_ID
|
||||
Init - cre_mbf - bad id (too great) - E_ID
|
||||
Init - cre_mbf - create mbf 1 TA_TFIFO - E_OK
|
||||
Init - cre_mbf - create mbf 1 again - E_OBJ
|
||||
Init - cre_mbf - create mbf 2 TA_TPRI - E_OK
|
||||
Init - del_mbf - bad id (less than -4) - E_OACV
|
||||
Init - del_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - del_mbf - bad id (0) - E_ID
|
||||
Init - del_mbf - bad id (too great) - E_ID
|
||||
Init - del_mbf - E_OK
|
||||
Init - psnd_mbf - bad id (less than -4) - E_OACV
|
||||
Init - psnd_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - psnd_mbf - bad id (0) - E_ID
|
||||
Init - psnd_mbf - bad id (too great) - E_ID
|
||||
Init - psnd_mbf - msg == 0, E_PAR
|
||||
Init - psnd_mbf - msgsz too big - E_PAR
|
||||
Init - psnd_mbf - msgsz <0 - E_PAR
|
||||
Init - psnd_mbf - E_OK
|
||||
Init - ref_mbf - bad id (less than -4) - E_OACV
|
||||
Init - ref_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - ref_mbf - bad id (0) - E_ID
|
||||
Init - ref_mbf - bad id (too great) - E_ID
|
||||
Init - ref_mbf - NULL pk_mbf returns E_PAR
|
||||
Init - ref_mbf - mbf 1 - E_OK
|
||||
Init - mbf 1 msgsz = 100
|
||||
Init - mbf 1 frbufsz = 400
|
||||
Init - mbf 1 waiting tasks = 0
|
||||
Init - mbf 1 sending tasks = 0
|
||||
Init - rcv_mbf - bad id (less than -4) - E_OACV
|
||||
Init - rcv_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - rcv_mbf - bad id (0) - E_ID
|
||||
Init - rcv_mbf - bad id (too great) - E_ID
|
||||
Init - rcv_mbf - NULL msg returns E_PAR
|
||||
Init - rcv_mbf - NULL p_msgsz returns E_PAR
|
||||
Init - rcv_mbf -- OK
|
||||
Message:[This is test message 1], length:100
|
||||
Init - ref_mbf - bad id (less than -4) - E_OACV
|
||||
Init - ref_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - ref_mbf - bad id (0) - E_ID
|
||||
Init - ref_mbf - bad id (too great) - E_ID
|
||||
Init - ref_mbf - NULL pk_mbf returns E_PAR
|
||||
Init - ref_mbf - mbf 1 - E_OK
|
||||
Init - mbf 1 msgsz = 0
|
||||
Init - mbf 1 frbufsz = 600
|
||||
Init - mbf 1 waiting tasks = 0
|
||||
Init - mbf 1 sending tasks = 0
|
||||
Init - prcv_mbf - bad id (less than -4) - E_OACV
|
||||
Init - prcv_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - prcv_mbf - bad id (0) - E_ID
|
||||
Init - prcv_mbf - bad id (too great) - E_ID
|
||||
Init - prcv_mbf - NULL msg returns E_PAR
|
||||
Init - prcv_mbf - NULL p_msgsz returns E_PAR
|
||||
Init - prcv_mbf -- E_TMOUT
|
||||
Init - trcv_mbf - bad id (less than -4) - E_OACV
|
||||
Init - trcv_mbf - bad id (between 0 and -4) - E_ID
|
||||
Init - trcv_mbf - bad id (0) - E_ID
|
||||
Init - trcv_mbf - bad id (too great) - E_ID
|
||||
Init - trcv_mbf - NULL msg returns E_PAR
|
||||
Init - trcv_mbf - NULL p_msgsz returns E_PAR
|
||||
Init - trcv_mbf - tmout <-2 returns E_PAR
|
||||
Init - trcv_mbf -- E_TMOUT
|
||||
Init - starting to block at Fri Jan 1 00:00:00 1988
|
||||
Init - time out at Fri Jan 1 00:00:01 1988
|
||||
*** END OF ITRONMBF01 --- ITRON MESSAGE BUFFER TEST ***
|
||||
@@ -1,40 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include <rtems/itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
#define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 10
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
#define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE (4 * RTEMS_MINIMUM_STACK_SIZE)
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,28 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = itronmbox01
|
||||
itronmbox01_SOURCES = init.c system.h
|
||||
|
||||
dist_rtems_tests_DATA = itronmbox01.scn
|
||||
dist_rtems_tests_DATA += itronmbox01.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
itronmbox01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(itronmbox01_OBJECTS) $(itronmbox01_LDADD)
|
||||
LINK_LIBS = $(itronmbox01_LDLIBS)
|
||||
|
||||
itronmbox01$(EXEEXT): $(itronmbox01_OBJECTS) $(itronmbox01_DEPENDENCIES)
|
||||
@rm -f itronmbox01$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,34 +0,0 @@
|
||||
/* 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-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
printf( "\n\n*** ITRON MBOX TEST 01 ***\n" );
|
||||
printf( "ITRON Mailboxes are implemented but there is currently no test.\n" );
|
||||
printf( "*** END OF ITRON MBOX TEST 01 ***\n" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,3 +0,0 @@
|
||||
*** ITRON MBOX TEST 01 ***
|
||||
ITRON Mailboxes are implemented but there is currently no test.
|
||||
*** END OF ITRON MBOX TEST 01 ***
|
||||
@@ -1,39 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include <rtems/itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
/* NOTICE: the clock driver is explicitly disabled */
|
||||
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,28 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = itronsem01
|
||||
itronsem01_SOURCES = init.c system.h
|
||||
|
||||
dist_rtems_tests_DATA = itronsem01.scn
|
||||
dist_rtems_tests_DATA += itronsem01.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
itronsem01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(itronsem01_OBJECTS) $(itronsem01_LDADD)
|
||||
LINK_LIBS = $(itronsem01_LDLIBS)
|
||||
|
||||
itronsem01$(EXEEXT): $(itronsem01_OBJECTS) $(itronsem01_DEPENDENCIES)
|
||||
@rm -f itronsem01$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,12 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.com/license/LICENSE.
|
||||
#
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
*** ITRONSEM01 -- ITRON SEMAPHORE TEST ***
|
||||
Init - cre_sem - NULL pk_sem returns E_PAR
|
||||
Init - cre_sem - isemcnt > maxsem returns E_PAR
|
||||
Init - cre_sem - maxsem of 0 returns E_PAR
|
||||
Init - cre_sem - bad id (less than -4) - E_OACV
|
||||
Init - cre_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - cre_sem - bad id (0) - E_ID
|
||||
Init - cre_sem - bad id (too great) - E_ID
|
||||
Init - cre_sem - create semaphore 1 TA_TFIFO - E_OK
|
||||
Init - cre_sem - create semaphore 1 again - E_OBJ
|
||||
Init - cre_sem - create semaphore 2 TA_TPRI - E_OK
|
||||
Init - del_sem - bad id (less than -4) - E_OACV
|
||||
Init - del_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - del_sem - bad id (0) - E_ID
|
||||
Init - del_sem - bad id (too great) - E_ID
|
||||
Init - sig_sem - bad id (less than -4) - E_OACV
|
||||
Init - sig_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - sig_sem - bad id (0) - E_ID
|
||||
Init - sig_sem - bad id (too great) - E_ID
|
||||
Init - preq_sem - bad id (less than -4) - E_OACV
|
||||
Init - preq_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - preq_sem - bad id (0) - E_ID
|
||||
Init - preq_sem - bad id (too great) - E_ID
|
||||
Init - wai_sem - bad id (less than -4) - E_OACV
|
||||
Init - wai_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - wai_sem - bad id (0) - E_ID
|
||||
Init - wai_sem - bad id (too great) - E_ID
|
||||
Init - twai_sem - bad id (less than -4) - E_OACV
|
||||
Init - twai_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - twai_sem - bad id (0) - E_ID
|
||||
Init - twai_sem - bad id (too great) - E_ID
|
||||
Init - ref_sem - bad id (less than -4) - E_OACV
|
||||
Init - ref_sem - bad id (between 0 and -4) - E_ID
|
||||
Init - ref_sem - bad id (0) - E_ID
|
||||
Init - ref_sem - bad id (too great) - E_ID
|
||||
Init - preq_sem - semaphore 1 available (count --> 1) - E_OK
|
||||
Init - preq_sem - semaphore 1 available (count --> 0) - E_OK
|
||||
Init - preq_sem - semaphore 1 unavailable - E_TMOUT
|
||||
Init - sig_sem - semaphore 1 (count --> 1) - E_OK
|
||||
Init - twai_sem(TMO_POL) - semaphore 1 available (count --> 0) - E_OK
|
||||
Init - twai_sem(TMO_POL) - semaphore 1 available - E_TMOUT
|
||||
Init - twai_sem - semaphore 1 unavailable - 1 second E_TMOUT
|
||||
Init - starting to block at Fri Jan 1 00:00:00 1988
|
||||
Init - timed out at Fri Jan 1 00:00:01 1988
|
||||
Init - twai_sem - semaphore 1 unavailable - timeout completed
|
||||
Init - sig_sem - semaphore 1 (count --> 1) - E_OK
|
||||
Init - sig_sem - semaphore 1 (count --> 2) - E_OK
|
||||
Init - sig_sem - semaphore 1 (count --> 3) - E_OK
|
||||
Init - sig_sem - semaphore 1 (count > maximum) - E_QOVR
|
||||
Init - ref_sem - NULL pk_sem returns E_PAR
|
||||
Init - ref_sem - semaphore 1 - E_OK
|
||||
Init - semaphore 1 count = 4
|
||||
Init - semaphore 1 waiting tasks = 0
|
||||
Init - preq_sem - semaphore 1 (count --> 2) - E_OK
|
||||
Init - ref_sem - semaphore 1 - E_OK
|
||||
Init - semaphore 1 count = 3
|
||||
Init - semaphore 1 waiting tasks = 0
|
||||
Init - del_sem - semaphore 1 deleted - E_OK
|
||||
Init - XXX need other tasks to complete the test XXX
|
||||
Init - dly_tsk - 1 second to let other task run
|
||||
*** END OF ITRONSEM01 -- ITRON SEMAPHORE TEST ***
|
||||
@@ -1,39 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include <rtems/itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 10
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,28 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = itrontask01
|
||||
itrontask01_SOURCES = init.c task1.c system.h
|
||||
|
||||
dist_rtems_tests_DATA = itrontask01.scn
|
||||
dist_rtems_tests_DATA += itrontask01.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
itrontask01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(itrontask01_OBJECTS) $(itrontask01_LDADD)
|
||||
LINK_LIBS = $(itrontask01_LDLIBS)
|
||||
|
||||
itrontask01$(EXEEXT): $(itrontask01_OBJECTS) $(itrontask01_DEPENDENCIES)
|
||||
@rm -f itrontask01$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,71 +0,0 @@
|
||||
/* 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-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
rtems_time_of_day time;
|
||||
ER status;
|
||||
T_CTSK pk_ctsk;
|
||||
|
||||
puts( "\n\n*** ITRON TASK TEST 1 ***" );
|
||||
|
||||
/*
|
||||
* XXX - Change this to an itron clock !!
|
||||
*/
|
||||
|
||||
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
|
||||
status = rtems_clock_set( &time );
|
||||
directive_failed( status, "rtems_clock_set" );
|
||||
|
||||
pk_ctsk.exinf = NULL;
|
||||
pk_ctsk.tskatr = TA_HLNG;
|
||||
pk_ctsk.itskpri = 1;
|
||||
pk_ctsk.task = Task_2_through_4;
|
||||
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2;
|
||||
status = cre_tsk( 2, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA1" );
|
||||
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2;
|
||||
status = cre_tsk( 3, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA2" );
|
||||
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 3;
|
||||
status = cre_tsk( 4, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA3" );
|
||||
|
||||
status = sta_tsk( 2, 0 );
|
||||
directive_failed( status, "sta_tsk of TA1" );
|
||||
|
||||
status = sta_tsk( 3, 0 );
|
||||
directive_failed( status, "sta_tsk of TA1" );
|
||||
|
||||
status = sta_tsk( 4, 0 );
|
||||
directive_failed( status, "sta_tsk of TA1" );
|
||||
|
||||
exd_tsk();
|
||||
directive_failed( 0, "exd_tsk" );
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.com/license/LICENSE.
|
||||
#
|
||||
|
||||
This file describes the directives and concepts tested by this test set.
|
||||
This test is based upon the test in sp01.
|
||||
|
||||
test set name: itrontask01
|
||||
|
||||
directives:
|
||||
cre_tsk, exd_tsk, get_tid, sta_tsk
|
||||
|
||||
concepts: XXX verify
|
||||
|
||||
a. Verifies system can create and start both the executive's system
|
||||
initialization and idle task.
|
||||
|
||||
b. Verifies executive can swap between three application tasks at the
|
||||
same priority and the executive's internal idle task.
|
||||
|
||||
c. Verifies can print strings to the CRT on port 2 of the mvme136 board
|
||||
using Print and Println in the board support package.
|
||||
|
||||
d. Verifies interrupt handler can handle a task switch from an interrupt
|
||||
as specified with the i_return directive.
|
||||
|
||||
e. Verifies executive initialization performed correctly.
|
||||
|
||||
f. Verifies the executive trap handler except for the halt function.
|
||||
|
||||
g. Verifies that a task can get the task identification number of itself.
|
||||
|
||||
a. Verifies exd_tsk
|
||||
|
||||
b. Verifies get_tid
|
||||
|
||||
notes:
|
||||
|
||||
rtems clock directives should change to itron clock directives when
|
||||
the clock directives are merged.
|
||||
|
||||
change rtems task wake after to itron routines.
|
||||
|
||||
output:
|
||||
"TA1" is printed once every 5 seconds.
|
||||
"TA2" is printed once every 10 seconds.
|
||||
"TA3" is printed once every 15 seconds.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
*** ITRON TASK TEST 1 ***
|
||||
TA1 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
TA2 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
TA3 - rtems_clock_get - 09:00:00 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:05 12/31/1988
|
||||
TA2 - rtems_clock_get - 09:00:10 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:10 12/31/1988
|
||||
TA3 - rtems_clock_get - 09:00:15 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:15 12/31/1988
|
||||
TA2 - rtems_clock_get - 09:00:20 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:20 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:25 12/31/1988
|
||||
TA3 - rtems_clock_get - 09:00:30 12/31/1988
|
||||
TA1 - rtems_clock_get - 09:00:30 12/31/1988
|
||||
TA2 - rtems_clock_get - 09:00:30 12/31/1988
|
||||
*** END OF ITRON TASK TEST 1 ***
|
||||
|
||||
NOTE: The order of the prints at each time interval is irrelevant.
|
||||
@@ -1,39 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include <rtems/itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
void Task_2_through_4(void);
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 4
|
||||
#define CONFIGURE_EXTRA_TASK_STACKS (RTEMS_MINIMUM_STACK_SIZE * 4)
|
||||
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,54 +0,0 @@
|
||||
/* Task_1_through_3
|
||||
*
|
||||
* 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-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
void Task_2_through_4(void)
|
||||
{
|
||||
ID tid;
|
||||
int tid_index;
|
||||
rtems_time_of_day time;
|
||||
ER status;
|
||||
char name[30];
|
||||
|
||||
status = get_tid( &tid );
|
||||
directive_failed( status, "get_tid");
|
||||
|
||||
tid_index = tid - 1; /* account for init tasks */
|
||||
|
||||
sprintf(name, "TA%d", tid_index);
|
||||
|
||||
while( FOREVER ) {
|
||||
status = rtems_clock_get_tod( &time );
|
||||
directive_failed( status, "rtems_clock_get_tod" );
|
||||
|
||||
if ( time.second >= 35 ) {
|
||||
puts( "*** END OF ITRON TASK TEST 1 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
printf(name);
|
||||
print_time( " - rtems_clock_get_tod - ", &time, "\n" );
|
||||
|
||||
status = rtems_task_wake_after(
|
||||
tid_index * 5 * rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,28 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = itrontask02
|
||||
itrontask02_SOURCES = init.c dormant.c system.h
|
||||
|
||||
dist_rtems_tests_DATA = itrontask02.scn
|
||||
dist_rtems_tests_DATA += itrontask02.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
itrontask02_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(itrontask02_OBJECTS) $(itrontask02_LDADD)
|
||||
LINK_LIBS = $(itrontask02_LDLIBS)
|
||||
|
||||
itrontask02$(EXEEXT): $(itrontask02_OBJECTS) $(itrontask02_DEPENDENCIES)
|
||||
@rm -f itrontask02$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,42 +0,0 @@
|
||||
/* Dormant
|
||||
*
|
||||
* This routine serves as two test tasks.
|
||||
* It has one dormant and one sleeping tasks.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
void Dormant_task(void)
|
||||
{
|
||||
puts( "DORMANT - ext_tsk - going to DORMANT state" );
|
||||
ext_tsk( );
|
||||
|
||||
puts( "ERROR==>ext_tsk of DORMANT returned" );
|
||||
rtems_test_assert(0);
|
||||
}
|
||||
|
||||
|
||||
void Non_Dormant_task(void)
|
||||
{
|
||||
ER status;
|
||||
|
||||
while (TRUE) {
|
||||
puts( "NON-DORMANT - Sleep for 2 minutes" );
|
||||
status = rtems_task_wake_after( 120*rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,34 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.com/license/LICENSE.
|
||||
#
|
||||
|
||||
This file describes the directives and concepts tested by this test set.
|
||||
This test forces and verifies error conditions for the task and task
|
||||
synchronization managers..
|
||||
|
||||
test set name: itrontask02
|
||||
|
||||
directives:
|
||||
chg_pri cre_tsk del_tsk dis_dsp ena_dsp exd_tsk ext_tsk
|
||||
frsm_tsk get_tid ref_tsk rel_wai rot_rdq rsm_tsk slp_tsk
|
||||
sta_tsk sus_tsk ter_tsk tslp_tsk wup_tsk
|
||||
|
||||
concepts:
|
||||
|
||||
a. Verification of error codes from all task and task synchronization
|
||||
commands.
|
||||
|
||||
notes:
|
||||
Unimplementted functions are stubbed out and should be added when
|
||||
the functions are finished.
|
||||
|
||||
output:
|
||||
Name of command and expected error code.
|
||||
Test asserts when an unexpected error code or an error does not occur.
|
||||
@@ -1,80 +0,0 @@
|
||||
*** ITRON TASK TEST 2 ***
|
||||
Init - cre_tsk - Dormant Task
|
||||
Init - cre_tsk - Non-Dormant Task
|
||||
NON-DORMANT - Sleep for 2 minutes
|
||||
|
||||
*** Create Task Errors ***
|
||||
Init - cre_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - cre_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - cre_tsk - cannot create TSK_SELF - E_ID
|
||||
Init - cre_tsk - invalid id; id already exists - E_OBJ
|
||||
Init - cre_tsk - tskatr is invalid - E_RSATR
|
||||
Init - cre_tsk - pk_ctsk is invalid - E_PAR
|
||||
Init - cre_tsk - itskpri is 0 - E_PAR
|
||||
Init - cre_tsk - itskpri is 257 - E_PAR
|
||||
Init - cre_tsk - stksz is invalid - E_PAR
|
||||
Init - cre_tsk - task is invalid - E_PAR
|
||||
|
||||
*** Delete Task Errors ***
|
||||
Init - del_tsk - cannot delete TSK_SELF - E_OBJ
|
||||
Init - del_tsk - task is not DORMANT - E_OBJ
|
||||
Init - del_tsk - task does not exist - E_NOEXS
|
||||
Init - del_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - del_tsk - cannot delete TSK_SELF - E_OBJ
|
||||
Init - del_tsk - bad id (between 0 and -4) - E_ID
|
||||
|
||||
*** Start Task Errors ***
|
||||
Init - sta_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - sta_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - sta_tsk - cannot start TSK_SELF - E_OBJ
|
||||
Init - sta_tsk - task is not DORMANT - E_OBJ
|
||||
Init - sta_tsk - task does not exist - E_NOEXS
|
||||
|
||||
*** Terminate Other Task Errors ***
|
||||
Init - ter_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - ter_tsk - cannot terminate TSK_SELF (0) - E_OBJ
|
||||
Init - ter_tsk - task is not DORMANT - E_OBJ
|
||||
Init - ter_tsk - task does not exist - E_NOEXS
|
||||
Init - ter_tsk - access violation ( id less than -4) - E_OACV
|
||||
|
||||
*** Change Priority Task Errors ***
|
||||
Init - chg_pri - bad id (between 0 and -4) - E_ID
|
||||
Init - chg_pri - task is DORMANT - E_OBJ
|
||||
Init - chg_pri - task does not exist - E_NOEXS
|
||||
Init - chg_pri - access violation ( id less than -4) - E_OACV
|
||||
Init - chg_pri - invalid priority - E_PAR
|
||||
|
||||
*** Rotate Ready Queue Errors ***
|
||||
Init - rot_rdq - priority -1 - E_PAR
|
||||
Init - rot_rdq - priority 257 - E_PAR
|
||||
|
||||
*** Reference Task Status Errors ***
|
||||
Init - ref_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - ref_tsk - task does not exist - E_NOEXS
|
||||
Init - ref_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - ref_tsk - packet address is bad - E_PAR
|
||||
|
||||
*** Suspend Task Errors ***
|
||||
Init - sus_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - sus_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - sus_tsk - cannot suspend SELF - E_OBJ
|
||||
Init - sus_tsk - task does not exist - E_NOEXS
|
||||
|
||||
*** Resume Task Errors ***
|
||||
Init - rsm_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - rsm_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - rsm_tsk - cannot resume SELF - E_OBJ
|
||||
Init - rsm_tsk - task is DORMANT - E_OBJ
|
||||
Init - rsm_tsk - task is NON_DORMANT not suspended - E_OK
|
||||
Init - rsm_tsk - task does not exist - E_NOEXS
|
||||
|
||||
*** Forcibly Resume Task Errors ***
|
||||
Init - frsm_tsk - access violation ( id less than -4) - E_OACV
|
||||
Init - frsm_tsk - bad id (between 0 and -4) - E_ID
|
||||
Init - frsm_tsk - cannot forcibly resume SELF - E_OBJ
|
||||
Init - frsm_tsk - task is DORMANT - E_OBJ
|
||||
Init - frsm_tsk - task does not exist - E_NOEXS
|
||||
Init - frsm_tsk - task is NON_DORMANT not suspended - E_OK
|
||||
|
||||
*** END OF ITRON TASK TEST 2 ***
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include <rtems/itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
void Dormant_task(void);
|
||||
void Non_Dormant_task(void);
|
||||
|
||||
/* configuration information */
|
||||
|
||||
/* NOTICE: the clock driver is explicitly disabled */
|
||||
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 5
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
#define DORMANT_TASK_ID 2
|
||||
#define NON_DORMANT_TASK_ID 3
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,28 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = itrontask03
|
||||
itrontask03_SOURCES = init.c preempt.c task1.c task2.c task3.c system.h
|
||||
|
||||
dist_rtems_tests_DATA = itrontask03.scn
|
||||
dist_rtems_tests_DATA += itrontask03.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
itrontask03_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(itrontask03_OBJECTS) $(itrontask03_LDADD)
|
||||
LINK_LIBS = $(itrontask03_LDLIBS)
|
||||
|
||||
itrontask03$(EXEEXT): $(itrontask03_OBJECTS) $(itrontask03_DEPENDENCIES)
|
||||
@rm -f itrontask03$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,137 +0,0 @@
|
||||
/* 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-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
ER status;
|
||||
T_CTSK pk_ctsk;
|
||||
T_RTSK pk_rtsk;
|
||||
|
||||
pk_ctsk.exinf = NULL;
|
||||
pk_ctsk.tskatr = TA_HLNG;
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE;
|
||||
pk_ctsk.itskpri = PREEMPT_PRIORITY;
|
||||
pk_ctsk.task = Preempt_task;
|
||||
|
||||
puts( "\n\n*** ITRON TASK TEST 3 ***" );
|
||||
|
||||
/*
|
||||
* Create and start the Preempt task the first time.
|
||||
* Verify that it is dormant when it comes back.
|
||||
*/
|
||||
|
||||
puts( "INIT - Create and Start PREEMPT" );
|
||||
status = chg_pri( TSK_SELF, (PREEMPT_PRIORITY+2) );
|
||||
directive_failed( status, "chg_pri of SELF" );
|
||||
|
||||
status = cre_tsk( PREEMPT_TASK_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of RTEMS_PREEMPT" );
|
||||
|
||||
status = sta_tsk( PREEMPT_TASK_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of RTEMS_PREEMPT" );
|
||||
puts( "INIT - rot_rdq - no tasks at this priority" );
|
||||
status = rot_rdq( 1 );
|
||||
directive_failed( status, "rot_rdq" );
|
||||
|
||||
puts( "INIT - ref_tsk PREEMPT - Validate DORMANT STATE" );
|
||||
status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
|
||||
directive_failed( status, "INIT - ref_tsk of RTEMS_PREEMPT");
|
||||
fatal_directive_status(pk_rtsk.tskstat,TTS_DMT,"tskstat of PREEMPT");
|
||||
|
||||
/*
|
||||
* Restart the Preempt Task.
|
||||
*/
|
||||
|
||||
status = sta_tsk( PREEMPT_TASK_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of RTEMS_PREEMPT" );
|
||||
puts( "INIT - rot_rdq - yielding processor" );
|
||||
status = rot_rdq( 1 );
|
||||
directive_failed( status, "rot_rdq" );
|
||||
puts( "INIT - ref_tsk PREEMPT - Validate no longer exists" );
|
||||
status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
|
||||
fatal_directive_status( status, E_NOEXS, "tskstat of PREEMPT");
|
||||
status = chg_pri( TSK_SELF, PREEMPT_PRIORITY );
|
||||
directive_failed( status, "chg_pri of SELF" );
|
||||
|
||||
/*
|
||||
* XXX
|
||||
*/
|
||||
|
||||
pk_ctsk.itskpri = 3;
|
||||
pk_ctsk.task = Task_1;
|
||||
status = cre_tsk( TA1_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA1" );
|
||||
|
||||
pk_ctsk.task = Task_2;
|
||||
status = cre_tsk( TA2_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA2" );
|
||||
|
||||
pk_ctsk.task = Task_3;
|
||||
status = cre_tsk( TA3_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA3" );
|
||||
|
||||
status = sta_tsk( TA1_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA1" );
|
||||
status = sta_tsk( TA2_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA2" );
|
||||
status = sta_tsk( TA3_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA3" );
|
||||
|
||||
status = ref_tsk( &pk_rtsk, TA1_ID);
|
||||
directive_failed( status, "INIT - ref_tsk of TA1");
|
||||
fatal_directive_status( pk_rtsk.tskstat, TTS_RDY , "tskstat of TA1");
|
||||
|
||||
puts( "INIT - suspending TA2 while middle task on a ready chain" );
|
||||
status = sus_tsk( TA2_ID );
|
||||
directive_failed( status, "sus_tsk of TA2" );
|
||||
status = ref_tsk( &pk_rtsk, TA2_ID);
|
||||
directive_failed( status, "INIT - ref_tsk of TA2");
|
||||
fatal_directive_status( pk_rtsk.tskstat, TTS_SUS, "tskstat of TA2");
|
||||
|
||||
status = ter_tsk( TA1_ID );
|
||||
directive_failed( status, "ter_tsk of TA1" );
|
||||
status = del_tsk( TA1_ID );
|
||||
directive_failed( status, "del_tsk of TA1" );
|
||||
status = ter_tsk( TA2_ID );
|
||||
directive_failed( status, "ter_tsk of TA2" );
|
||||
status = ter_tsk( TA3_ID );
|
||||
directive_failed( status, "ter_tsk of TA3" );
|
||||
|
||||
pk_ctsk.itskpri = 1;
|
||||
pk_ctsk.task = Task_1;
|
||||
status = cre_tsk( TA1_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA1 at priority 1" );
|
||||
|
||||
status = sta_tsk( TA1_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA1" );
|
||||
status = sta_tsk( TA2_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA2" );
|
||||
status = sta_tsk( TA3_ID, 0 );
|
||||
directive_failed( status, "sta_tsk of TA3" );
|
||||
|
||||
exd_tsk();
|
||||
rtems_test_assert(0);
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.com/license/LICENSE.
|
||||
#
|
||||
|
||||
This file describes the directives and concepts tested by this test set.
|
||||
This test is based upon the test in sp0.
|
||||
|
||||
test set name: itrontask03
|
||||
|
||||
directives:
|
||||
chg_pri cre_tsk del_tsk exd_tsk rot_rdq sta_tsk sus_tsk ter_tsk
|
||||
|
||||
concepts: XXX - Verify
|
||||
|
||||
a. verifies rot_rdq can be used by equal priority tasks to correctly yeild the processor
|
||||
|
||||
b. Verifies sus_tsk suspends another task.
|
||||
|
||||
c. Verifies rot_rdq with a yeild process response.
|
||||
|
||||
a. Verifies that a task can delete another task and also delete itself.
|
||||
|
||||
b. Verifies that memory is freed back to the heap correctly.
|
||||
|
||||
c. Verifies that TCBs are freed back to the inactive chain correctly.
|
||||
|
||||
d. Verifies that a task can get the task identification number of
|
||||
another task.
|
||||
|
||||
e. Verifies the _Set_state routine where the task is not READY.
|
||||
|
||||
f. Verifies the break statement in the _Block_activate routine.
|
||||
|
||||
g. Verifies the while loop in the _Prev_tcb routine.
|
||||
|
||||
notes:
|
||||
|
||||
rtems_wake_after calls should be replaced with itron calls when
|
||||
the time functionality is added.
|
||||
|
||||
output:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
*** ITRON TASK TEST 3 ***
|
||||
INIT - Create and Start PREEMPT
|
||||
PREEMPT - ref_tsk validation
|
||||
PREEMPT - chg_pri increment priority
|
||||
PREEMPT - ext_tsk - going to DORMANT state
|
||||
INIT - rot_rdq - no tasks at this priority
|
||||
INIT - ref_tsk PREEMPT - Validate DORMANT STATE
|
||||
PREEMPT - ref_tsk validation
|
||||
PREEMPT - exd_tsk - Exit and Delete task
|
||||
INIT - rot_rdq - yielding processor
|
||||
INIT - ref_tsk PREEMPT - Validate no longer exists
|
||||
INIT - suspending TA2 while middle task on a ready chain
|
||||
TA1 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_wake_after - sleep 1 minute
|
||||
TA3 - rtems_task_wake_after - sleep 5 seconds
|
||||
TA1 - chg_pri - set TA3's priority to 2
|
||||
TA1 - sus_tsk - suspend TA2
|
||||
TA1 - - delete TA2
|
||||
TA1 - rtems_task_wake_after - sleep for 5 seconds
|
||||
TA3 - exd_tsk - exit and delete self
|
||||
*** END OF ITRON TASK TEST 3 ***
|
||||
@@ -1,52 +0,0 @@
|
||||
/* Preempt_task
|
||||
*
|
||||
* This routine serves as a test task. It verifies the task manager.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
int Preempt_task_Count;
|
||||
|
||||
void Preempt_task()
|
||||
{
|
||||
ER status;
|
||||
T_RTSK pk_rtsk;
|
||||
|
||||
puts( "PREEMPT - ref_tsk validation" );
|
||||
status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
|
||||
fatal_directive_status( status, E_OK , "ref_tsk of PREEMPT");
|
||||
rtems_test_assert( pk_rtsk.tskpri == PREEMPT_PRIORITY );
|
||||
rtems_test_assert( pk_rtsk.itskpri == PREEMPT_PRIORITY );
|
||||
rtems_test_assert( pk_rtsk.task == Preempt_task );
|
||||
rtems_test_assert( pk_rtsk.stksz >= RTEMS_MINIMUM_STACK_SIZE );
|
||||
rtems_test_assert( pk_rtsk.tskstat == (TTS_RUN | TTS_RDY) );
|
||||
|
||||
if ( Preempt_task_Count == 0 ) {
|
||||
Preempt_task_Count ++;
|
||||
puts( "PREEMPT - chg_pri increment priority ");
|
||||
status = chg_pri( PREEMPT_TASK_ID, (PREEMPT_PRIORITY+1) );
|
||||
directive_failed( status, "chg_pri" );
|
||||
puts( "PREEMPT - ext_tsk - going to DORMANT state" );
|
||||
ext_tsk( );
|
||||
rtems_test_assert( 0 );
|
||||
} else {
|
||||
Preempt_task_Count ++;
|
||||
puts( "PREEMPT - exd_tsk - Exit and Delete task" );
|
||||
exd_tsk( );
|
||||
rtems_test_assert( 0 );
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include <rtems/itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
void Preempt_task(void);
|
||||
void Task_1(void);
|
||||
void Task_2(void);
|
||||
void Task_3(void);
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 6
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
#define PREEMPT_TASK_ID 2
|
||||
#define TA1_ID 3
|
||||
#define TA2_ID 4
|
||||
#define TA3_ID 5
|
||||
|
||||
|
||||
#define PREEMPT_PRIORITY 1
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,57 +0,0 @@
|
||||
/* Task_1
|
||||
*
|
||||
* This routine serves as a test task. It verifies the task manager.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
void Task_1()
|
||||
{
|
||||
ER status;
|
||||
|
||||
/*
|
||||
* XXX - Change to itron routine.
|
||||
*/
|
||||
|
||||
puts( "TA1 - rtems_task_wake_after - sleep 1 second" );
|
||||
status = rtems_task_wake_after( 1*rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
status = chg_pri( TA3_ID , 2 );
|
||||
directive_failed( status, "chg_pri" );
|
||||
|
||||
puts( "TA1 - chg_pri - set TA3's priority to 2" );
|
||||
|
||||
puts( "TA1 - sus_tsk - suspend TA2" );
|
||||
status = sus_tsk( TA2_ID );
|
||||
directive_failed( status, "sus_tsk of TA2" );
|
||||
|
||||
puts( "TA1 - - delete TA2" );
|
||||
status = ter_tsk( TA2_ID );
|
||||
directive_failed( status, "ter_tsk of TA2" );
|
||||
|
||||
/*
|
||||
* XXX - Change to itron routine.
|
||||
*/
|
||||
|
||||
puts( "TA1 - rtems_task_wake_after - sleep for 5 seconds" );
|
||||
status = rtems_task_wake_after( 5*rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
|
||||
puts( "*** END OF ITRON TASK TEST 3 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/* Task_2
|
||||
*
|
||||
* This routine serves as a test task. It sleeps for 1 minute but
|
||||
* does not expect to wake up. Task 1 should suspend then delete it
|
||||
* so that it appears to never wake up.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
void Task_2()
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
puts( "TA2 - rtems_task_wake_after - sleep 1 minute" );
|
||||
status = rtems_task_wake_after( 60*rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after in TA2" );
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/* Task_3
|
||||
*
|
||||
* This routine serves as a test task. It simply sleeps for 5 seconds
|
||||
* and then deletes itself.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
void Task_3()
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
/*
|
||||
* XXX - Convert Later.
|
||||
*/
|
||||
|
||||
puts( "TA3 - rtems_task_wake_after - sleep 5 seconds" );
|
||||
status = rtems_task_wake_after( 5*rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after in TA3" );
|
||||
|
||||
|
||||
puts( "TA3 - exd_tsk - exit and delete self" );
|
||||
exd_tsk();
|
||||
directive_failed( 0, "exd_tsk" );
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,28 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = itrontask04
|
||||
itrontask04_SOURCES = init.c task1.c task2.c task3.c system.h
|
||||
|
||||
dist_rtems_tests_DATA = itrontask04.scn
|
||||
dist_rtems_tests_DATA += itrontask04.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
itrontask04_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(itrontask04_OBJECTS) $(itrontask04_LDADD)
|
||||
LINK_LIBS = $(itrontask04_LDLIBS)
|
||||
|
||||
itrontask04$(EXEEXT): $(itrontask04_OBJECTS) $(itrontask04_DEPENDENCIES)
|
||||
@rm -f itrontask04$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,95 +0,0 @@
|
||||
/* 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-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <rtems.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
ER status;
|
||||
T_CTSK pk_ctsk;
|
||||
|
||||
puts( "\n\n*** ITRON TASK TEST 4 ***" );
|
||||
|
||||
status = chg_pri( 0, RTEMS_MAXIMUM_PRIORITY - 2 );
|
||||
directive_failed( status, "chg_pri to MAX - 2" );
|
||||
|
||||
pk_ctsk.exinf = NULL;
|
||||
pk_ctsk.tskatr = TA_HLNG;
|
||||
pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE;
|
||||
pk_ctsk.itskpri = 2;
|
||||
|
||||
pk_ctsk.task = Task_1;
|
||||
status = cre_tsk( TA1_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA1" );
|
||||
|
||||
pk_ctsk.task = Task_2;
|
||||
status = cre_tsk( TA2_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA2" );
|
||||
|
||||
pk_ctsk.itskpri = 1;
|
||||
pk_ctsk.task = Task_3;
|
||||
status = cre_tsk( TA3_ID, &pk_ctsk );
|
||||
directive_failed( status, "cre_tsk of TA3" );
|
||||
|
||||
puts("INIT - dis_dsp while starting tasks");
|
||||
status = dis_dsp( );
|
||||
|
||||
/* dispatching disabled -- NOT LEGAL TO PRINT UNTIL ENABLED */
|
||||
|
||||
directive_failed_with_level( status, "dis_dsp from ITRON_Init", 1 );
|
||||
status = sta_tsk( TA1_ID, 0 );
|
||||
directive_failed_with_level( status, "sta_tsk of TA1", 1 );
|
||||
status = sta_tsk( TA2_ID, 0 );
|
||||
directive_failed_with_level( status, "sta_tsk of TA2", 1 );
|
||||
status = sta_tsk( TA3_ID, 0 );
|
||||
directive_failed_with_level( status, "sta_tsk of TA3", 1 );
|
||||
|
||||
/* puts( "INIT - suspending TA2 3 times" ); */
|
||||
status = sus_tsk( TA2_ID );
|
||||
directive_failed_with_level( status, "sus_tsk of TA2", 1 );
|
||||
status = sus_tsk( TA2_ID );
|
||||
directive_failed_with_level( status, "sus_tsk of TA2", 1 );
|
||||
status = sus_tsk( TA2_ID );
|
||||
directive_failed_with_level( status, "sus_tsk of TA2", 1 );
|
||||
|
||||
status = ena_dsp( );
|
||||
|
||||
/* dispatching enabled -- LEGAL TO PRINT AGAIN */
|
||||
|
||||
puts("INIT - ena_dsp after starting tasks");
|
||||
|
||||
puts( "INIT - suspending TA1 3 times" );
|
||||
status = sus_tsk( TA1_ID );
|
||||
directive_failed( status, "sus_tsk of TA2" );
|
||||
status = sus_tsk( TA1_ID );
|
||||
directive_failed( status, "sus_tsk of TA2" );
|
||||
status = sus_tsk( TA1_ID );
|
||||
directive_failed( status, "sus_tsk of TA2" );
|
||||
|
||||
puts("INIT - exd_tsk");
|
||||
exd_tsk();
|
||||
directive_failed( 0, "exd_tsk" );
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.com/license/LICENSE.
|
||||
#
|
||||
|
||||
This file describes the directives and concepts tested by this test set.
|
||||
|
||||
test set name: itrontask04
|
||||
|
||||
directives:
|
||||
chg_pri cre_tsk dis_dsp ena_dsp exd_tsk frsm_tsk rot_rdq rsm_tsk
|
||||
sta_tsk sus_tsk
|
||||
|
||||
concepts:
|
||||
|
||||
a. This test check task suspend and resume functionality.
|
||||
|
||||
b. Verifies the suspend count works correctly.
|
||||
|
||||
c. Verifies the forced resume works correctly
|
||||
|
||||
d. Verifies the rotate ready queue works correctly
|
||||
|
||||
e. Verifies a task called with rtems suspend can be resumed
|
||||
with an itron resume call. ( XXX - May not be necessary. )
|
||||
|
||||
f. verifies rot_rdq can be used by non-equal priority tasks to correctly rotate ready queue.
|
||||
|
||||
g. Verifies enable dispatch and disable dispatch work.
|
||||
|
||||
notes:
|
||||
|
||||
This verision of ITRON does not provide a way for a task to
|
||||
suspend itself (only another task can suspend it). Therefore,
|
||||
the test calls rtems_task_suspend to suspend it.
|
||||
|
||||
rtems_task_wake_after calls should be replaced with itron call
|
||||
when the ITRON functionality is finished.
|
||||
|
||||
output:
|
||||
|
||||
XXX - Verify the output messages on this test. It looks like
|
||||
the suspend count doesn't look correct. ??? Nov 10, 99
|
||||
@@ -1,34 +0,0 @@
|
||||
** ITRON TASK TEST 4 ***
|
||||
INIT - dis_dsp while starting tasks
|
||||
TA3 - frsm_tsk TA1
|
||||
TA3 - rsm_tsk TA2
|
||||
TA3 - rot_rdq priority 2 queue
|
||||
TA3 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
INIT - ena_dsp after starting tasks
|
||||
INIT - suspending TA1 3 times
|
||||
INIT - exd_tsk
|
||||
TA3 - frsm_tsk TA1
|
||||
TA3 - rsm_tsk TA2
|
||||
TA3 - rot_rdq priority 2 queue
|
||||
TA3 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA3 - frsm_tsk TA1
|
||||
TA3 - rsm_tsk TA2
|
||||
TA3 - rot_rdq priority 2 queue
|
||||
TA3 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA3 - frsm_tsk TA1
|
||||
TA3 - rsm_tsk TA2
|
||||
TA3 - rot_rdq priority 2 queue
|
||||
TA3 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA3 - frsm_tsk TA1
|
||||
TA3 - rsm_tsk TA2
|
||||
TA3 - rot_rdq priority 2 queue
|
||||
TA3 - rtems_task_wake_after - sleep 1 second
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
TA2 - rtems_task_suspend RTEMS_SELF
|
||||
*** END OF ITRON TASK TEST 4 ***
|
||||
@@ -1,47 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include <rtems/itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
extern void ITRON_Init( void );
|
||||
extern void Preempt_task(void);
|
||||
extern void Task_1(void);
|
||||
extern void Task_2(void);
|
||||
extern void Task_3(void);
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 5
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
#define PREEMPT_TASK_ID 2
|
||||
#define TA1_ID 3
|
||||
#define TA2_ID 4
|
||||
#define TA3_ID 5
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,38 +0,0 @@
|
||||
/* Task_1
|
||||
*
|
||||
* This routine serves as a test task. It verifies the task manager.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
/*
|
||||
* XXX - This test requires tasks to suspend self, yet ITRON defines
|
||||
* this as an error.
|
||||
*/
|
||||
|
||||
void Task_1()
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
while (1) {
|
||||
|
||||
puts( "TA2 - rtems_task_suspend RTEMS_SELF" );
|
||||
status = rtems_task_suspend( RTEMS_SELF );
|
||||
directive_failed( status, "TA2 rtems_task_suspend RTEMS_SELF" );
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/* Task_2
|
||||
*
|
||||
* This routine serves as a test task. It sleeps for 1 minute but
|
||||
* does not expect to wake up. Task 1 should suspend then delete it
|
||||
* so that it appears to never wake up.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
/*
|
||||
* XXX - This test requires tasks to suspend self, yet ITRON defines
|
||||
* this as an error.
|
||||
*/
|
||||
|
||||
void Task_2()
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
while (1) {
|
||||
|
||||
puts( "TA2 - rtems_task_suspend RTEMS_SELF" );
|
||||
status = rtems_task_suspend( RTEMS_SELF );
|
||||
directive_failed( status, "TA2 rtems_task_suspend RTEMS_SELF" );
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/* Task_3
|
||||
*
|
||||
* This routine serves as a test task. It simply sleeps for 5 seconds
|
||||
* and then deletes itself.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
void Task_3(void)
|
||||
{
|
||||
rtems_status_code status;
|
||||
int i;
|
||||
|
||||
for(i=0; i<5; i++) {
|
||||
puts("TA3 - frsm_tsk TA1");
|
||||
status = frsm_tsk( TA1_ID );
|
||||
directive_failed( status, "TA3 - frsm_tsk TA1" );
|
||||
|
||||
puts("TA3 - rsm_tsk TA2");
|
||||
status = rsm_tsk( TA2_ID );
|
||||
directive_failed( status, "TA3 - rsm_tsk TA2" );
|
||||
|
||||
puts( "TA3 - rot_rdq priority 2 queue");
|
||||
status = rot_rdq( 2 );
|
||||
directive_failed( status, "rot_rdq for 2" );
|
||||
|
||||
/*
|
||||
* XXX - Convert Later.
|
||||
*/
|
||||
|
||||
puts( "TA3 - rtems_task_wake_after - sleep 1 second" );
|
||||
status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
|
||||
directive_failed( status, "rtems_task_wake_after in TA3" );
|
||||
}
|
||||
|
||||
puts( "*** END OF ITRON TASK TEST 4 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,28 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = itrontime01
|
||||
itrontime01_SOURCES = init.c system.h
|
||||
|
||||
dist_rtems_tests_DATA = itrontime01.scn
|
||||
dist_rtems_tests_DATA += itrontime01.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
itrontime01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(itrontime01_OBJECTS) $(itrontime01_LDADD)
|
||||
LINK_LIBS = $(itrontime01_LDLIBS)
|
||||
|
||||
itrontime01$(EXEEXT): $(itrontime01_OBJECTS) $(itrontime01_DEPENDENCIES)
|
||||
@rm -f itrontime01$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,60 +0,0 @@
|
||||
/* 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-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
/*
|
||||
* get the current time in second since epoch (1970), change it since 1985,
|
||||
* compute the time in millisecond
|
||||
*
|
||||
*/
|
||||
|
||||
int time_sec_epoch( void ) {
|
||||
|
||||
long s_time,t_time,r_time;
|
||||
long m_sec;
|
||||
|
||||
t_time = time(NULL);
|
||||
s_time = (1985L-1970L)*365L*24L*60L*60L;
|
||||
r_time = t_time - s_time;
|
||||
m_sec = r_time*1000;
|
||||
|
||||
printf( "Time from 1970: %ld\n", t_time );
|
||||
printf( "Time between 1970 and 1985: %ld\n", s_time );
|
||||
printf( "Time from 1985: %ld\n", r_time );
|
||||
printf("milliseconds: %ld\n",m_sec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
printf( "\n\n*** ITRON TIME TEST 01 ***\n" );
|
||||
printf( "The Time Services are not completely implemented.\n" );
|
||||
printf( "*** END OF ITRON TIME TEST 01 ***\n" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,4 +0,0 @@
|
||||
*** ITRON TIME TEST 01 ***
|
||||
The Time Services are not completely implemented.
|
||||
*** END OF ITRON TIME TEST 01 ***
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include <rtems/itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
/* NOTICE: the clock driver is explicitly disabled */
|
||||
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,14 +0,0 @@
|
||||
aclocal.m4
|
||||
autom4te*.cache
|
||||
config.cache
|
||||
config.guess
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
Makefile
|
||||
Makefile.in
|
||||
missing
|
||||
mkinstalldirs
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,12 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../aclocal
|
||||
|
||||
noinst_HEADERS = include/timesys.h
|
||||
|
||||
SUBDIRS = tmitronsem01
|
||||
|
||||
include $(top_srcdir)/../automake/subdirs.am
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,6 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
This directory contains the functionality tests for the ITRON 3.0 API
|
||||
implementation.
|
||||
@@ -1,34 +0,0 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
##
|
||||
## $Id$
|
||||
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT([rtems-c-src-tests-tmitrontests],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
|
||||
AC_CONFIG_SRCDIR([tmitronsem01])
|
||||
RTEMS_TOP([../..],[..])
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
|
||||
AM_INIT_AUTOMAKE([no-define foreign 1.10])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
|
||||
RTEMS_ENV_RTEMSBSP
|
||||
|
||||
RTEMS_PROJECT_ROOT
|
||||
|
||||
RTEMS_PROG_CC_FOR_TARGET
|
||||
|
||||
RTEMS_CANONICALIZE_TOOLS
|
||||
|
||||
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
|
||||
|
||||
|
||||
OPERATION_COUNT=${OPERATION_COUNT-100}
|
||||
AC_SUBST(OPERATION_COUNT)
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile
|
||||
tmitronsem01/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
@@ -1,55 +0,0 @@
|
||||
/* timesys.h
|
||||
*
|
||||
* This header file contains the global variables for the Time
|
||||
* suite.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
|
||||
/*
|
||||
* How many times a particular operation is performed while timed.
|
||||
*/
|
||||
|
||||
#ifndef OPERATION_COUNT
|
||||
#define OPERATION_COUNT 100
|
||||
#endif
|
||||
|
||||
/* functions */
|
||||
|
||||
#define put_time( _message, _total_time, \
|
||||
_iterations, _loop_overhead, _overhead ) \
|
||||
printf( \
|
||||
"%s %" PRId32 "\n", \
|
||||
(_message), \
|
||||
(((_total_time) - (_loop_overhead)) / (_iterations)) - (_overhead) \
|
||||
)
|
||||
|
||||
#if defined(CONFIGURE_STACK_CHECKER_ENABLED) || defined(RTEMS_DEBUG)
|
||||
#define Print_Warning() \
|
||||
do { \
|
||||
puts( \
|
||||
"\n" \
|
||||
"THE TIMES REPORTED BY THIS TEST INCLUDE DEBUG CODE!\n" \
|
||||
"\n" \
|
||||
); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
#define Print_Warning()
|
||||
#endif
|
||||
|
||||
/* variables */
|
||||
|
||||
TEST_EXTERN volatile uint32_t end_time; /* ending time variable */
|
||||
TEST_EXTERN volatile uint32_t overhead; /* loop overhead variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -1,30 +0,0 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = tmitronsem01
|
||||
tmitronsem01_SOURCES = init.c system.h \
|
||||
../../support/src/tmtests_empty_function.c
|
||||
|
||||
dist_rtems_tests_DATA = tmitronsem01.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
tmitronsem01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
OPERATION_COUNT = @OPERATION_COUNT@
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(tmitronsem01_OBJECTS) $(tmitronsem01_LDADD)
|
||||
LINK_LIBS = $(tmitronsem01_LDLIBS)
|
||||
|
||||
tmitronsem01$(EXEEXT): $(tmitronsem01_OBJECTS) $(tmitronsem01_DEPENDENCIES)
|
||||
@rm -f tmitronsem01$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
@@ -1,144 +0,0 @@
|
||||
/* 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-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
#include <timesys.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void ITRON_Init( void )
|
||||
{
|
||||
T_CSEM pk_csem;
|
||||
T_RSEM pk_rsem;
|
||||
int index;
|
||||
|
||||
pk_csem.isemcnt = 2;
|
||||
pk_csem.maxsem = 3;
|
||||
pk_csem.sematr = TA_TFIFO;
|
||||
|
||||
printf( "\n\n*** TMITRON01 -- ITRON TIMING TEST ***\n" );
|
||||
|
||||
/*
|
||||
* time one invocation of cre_sem
|
||||
*/
|
||||
|
||||
benchmark_timer_initialize();
|
||||
(void) cre_sem( 1, &pk_csem );
|
||||
end_time = benchmark_timer_read();
|
||||
put_time(
|
||||
"cre_sem",
|
||||
end_time,
|
||||
1,
|
||||
0, /* no loop overhead to take out */
|
||||
0 /* no calling overhead */
|
||||
);
|
||||
|
||||
/*
|
||||
* time one invocation of del_sem
|
||||
*/
|
||||
|
||||
benchmark_timer_initialize();
|
||||
(void) del_sem( 1 );
|
||||
end_time = benchmark_timer_read();
|
||||
put_time(
|
||||
"del_sem",
|
||||
end_time,
|
||||
1,
|
||||
0, /* no loop overhead to take out */
|
||||
0 /* no calling overhead */
|
||||
);
|
||||
|
||||
pk_csem.isemcnt = 100;
|
||||
pk_csem.maxsem = 100;
|
||||
pk_csem.sematr = TA_TFIFO;
|
||||
(void) cre_sem( 1, &pk_csem );
|
||||
|
||||
/*
|
||||
* time preq_sem (available)
|
||||
*/
|
||||
|
||||
benchmark_timer_initialize();
|
||||
for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
|
||||
(void) preq_sem( 1 );
|
||||
end_time = benchmark_timer_read();
|
||||
put_time(
|
||||
"preq_sem (available)",
|
||||
end_time,
|
||||
OPERATION_COUNT,
|
||||
0, /* don't take the loop overhead out */
|
||||
0 /* no calling overhead */
|
||||
);
|
||||
|
||||
/*
|
||||
* time preq_sem (not available)
|
||||
*/
|
||||
|
||||
benchmark_timer_initialize();
|
||||
for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
|
||||
(void) preq_sem( 1 );
|
||||
end_time = benchmark_timer_read();
|
||||
put_time(
|
||||
"preq_sem (not available)",
|
||||
end_time,
|
||||
OPERATION_COUNT,
|
||||
0, /* don't take the loop overhead out */
|
||||
0 /* no calling overhead */
|
||||
);
|
||||
|
||||
/*
|
||||
* time sig_sem (no waiting tasks)
|
||||
*/
|
||||
|
||||
benchmark_timer_initialize();
|
||||
for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
|
||||
(void) sig_sem( 1 );
|
||||
end_time = benchmark_timer_read();
|
||||
put_time(
|
||||
"sig_sem (no waiting tasks)",
|
||||
end_time,
|
||||
OPERATION_COUNT,
|
||||
0, /* don't take the loop overhead out */
|
||||
0 /* no calling overhead */
|
||||
);
|
||||
|
||||
/*
|
||||
* time ref_sem
|
||||
*/
|
||||
|
||||
benchmark_timer_initialize();
|
||||
for ( index = 1 ; index<=OPERATION_COUNT ; index++ )
|
||||
(void) ref_sem( 1, &pk_rsem );
|
||||
end_time = benchmark_timer_read();
|
||||
put_time(
|
||||
"ref_sem",
|
||||
end_time,
|
||||
OPERATION_COUNT,
|
||||
0, /* don't take the loop overhead out */
|
||||
0 /* no calling overhead */
|
||||
);
|
||||
|
||||
printf( "\n\nXXX ADD BLOCKING AND PREEMPTING TIME TESTS\n\n" );
|
||||
|
||||
|
||||
printf( "*** END OF TMITRON01 -- ITRON TIMING TEST ***\n" );
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include <rtems/itron.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
void ITRON_Init( void );
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_ITRON_TASKS 1
|
||||
#define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 100
|
||||
#define CONFIGURE_ITRON_INIT_TASK_TABLE
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Global_variable; /* example global variable */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,9 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.com/license/LICENSE.
|
||||
#
|
||||
|
||||
Time some basic ITRON semaphore operations
|
||||
Reference in new issue
Block a user