diff options
Diffstat (limited to 'testsuites/tmtests/tm27')
-rw-r--r-- | testsuites/tmtests/tm27/system.h | 40 | ||||
-rw-r--r-- | testsuites/tmtests/tm27/task1.c | 272 | ||||
-rw-r--r-- | testsuites/tmtests/tm27/tm27.doc | 13 |
3 files changed, 0 insertions, 325 deletions
diff --git a/testsuites/tmtests/tm27/system.h b/testsuites/tmtests/tm27/system.h deleted file mode 100644 index 6b2f2c420b..0000000000 --- a/testsuites/tmtests/tm27/system.h +++ /dev/null @@ -1,40 +0,0 @@ -/* system.h - * - * This include file is used by all tests in the Time Suite. - * - * 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 <coverhd.h> -#include <tmacros.h> - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -#include <timesys.h> - -/* configuration information */ - -#define CONFIGURE_TMTEST - -#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 111 -#define CONFIGURE_TICKS_PER_TIMESLICE 0 - -#include <confdefs.h> - -/* end of include file */ diff --git a/testsuites/tmtests/tm27/task1.c b/testsuites/tmtests/tm27/task1.c deleted file mode 100644 index aa346fb29e..0000000000 --- a/testsuites/tmtests/tm27/task1.c +++ /dev/null @@ -1,272 +0,0 @@ -/* - * - * 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$ - */ - -/* - * WARNING!!!!!!!!! - * - * THIS TEST USES INTERNAL RTEMS VARIABLES!!! - */ - -#define TEST_INIT -#include "system.h" - -#include <bsp.h> - -rtems_task Task_1( - rtems_task_argument argument -); - -rtems_task Task_2( - rtems_task_argument argument -); - -volatile rtems_unsigned32 Interrupt_occurred; -volatile rtems_unsigned32 Interrupt_enter_time, Interrupt_enter_nested_time; -volatile rtems_unsigned32 Interrupt_return_time, Interrupt_return_nested_time; -rtems_unsigned32 Interrupt_nest; - -rtems_isr Isr_handler( - rtems_vector_number vector -); - -rtems_task Init( - rtems_task_argument argument -) -{ - rtems_status_code status; - - Print_Warning(); - - puts( "\n\n*** TIME TEST 27 ***" ); - - status = rtems_task_create( - rtems_build_name( 'T', 'A', '1', ' ' ), - 254, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &Task_id[ 1 ] - ); - directive_failed( status, "rtems_task_create Task_1" ); - - status = rtems_task_start( Task_id[ 1 ], Task_1, 0 ); - directive_failed( status, "rtems_task_start Task_1" ); - - status = rtems_task_create( - rtems_build_name( 'T', 'A', '2', ' ' ), - 254, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &Task_id[ 2 ] - ); - directive_failed( status, "rtems_task_create of Task_2" ); - - status = rtems_task_start( Task_id[ 2 ], Task_2, 0 ); - directive_failed( status, "rtems_task_start of Task_2" ); - - status = rtems_task_delete( RTEMS_SELF ); - directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); -} - -rtems_task Task_1( - rtems_task_argument argument -) -{ - Install_tm27_vector( Isr_handler ); - - /* - * No preempt .. no nesting - */ - - Interrupt_nest = 0; - - _Thread_Dispatch_disable_level = 0; - - Interrupt_occurred = 0; - Timer_initialize(); - Cause_tm27_intr(); - /* goes to Isr_handler */ - -#if (MUST_WAIT_FOR_INTERRUPT == 1) - while ( Interrupt_occurred == 0 ); -#endif - Interrupt_return_time = Read_timer(); - - put_time( - "interrupt entry overhead: returns to interrupted task", - Interrupt_enter_time, - 1, - 0, - 0 - ); - - put_time( - "interrupt exit overhead: returns to interrupted task", - Interrupt_return_time, - 1, - 0, - 0 - ); - - /* - * No preempt .. nested - */ - - _Thread_Dispatch_disable_level = 1; - - Interrupt_nest = 1; - - Interrupt_occurred = 0; - Timer_initialize(); - Cause_tm27_intr(); - /* goes to Isr_handler */ - -#if (MUST_WAIT_FOR_INTERRUPT == 1) - while ( Interrupt_occurred == 0 ); -#endif - Interrupt_return_time = Read_timer(); - - put_time( - "interrupt entry overhead: returns to nested interrupt", - Interrupt_enter_nested_time, - 1, - 0, - 0 - ); - - put_time( - "interrupt exit overhead: returns to nested interrupt", - Interrupt_return_nested_time, - 1, - 0, - 0 - ); - - /* - * Does a preempt .. not nested - */ - - _Thread_Dispatch_disable_level = 0; - - _Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[254].last; - - _Context_Switch_necessary = 1; - - Interrupt_occurred = 0; - Timer_initialize(); - Cause_tm27_intr(); - - /* - * goes to Isr_handler and then returns - */ - - puts( "*** END OF TEST 27 ***" ); - exit( 0 ); -} - -/* - * NOTE: When this task is executing, some of the assumptions made - * regarding the placement of the currently executing task's TCB - * on the ready chains have been violated. At least the assumption - * that this task is at the head of the chain for its priority - * has been violated. - */ - -rtems_task Task_2( - rtems_task_argument argument -) -{ -#if (MUST_WAIT_FOR_INTERRUPT == 1) - while ( Interrupt_occurred == 0 ); -#endif - end_time = Read_timer(); - - put_time( - "interrupt entry overhead: returns to preempting task", - Interrupt_enter_time, - 1, - 0, - 0 - ); - - put_time( - "interrupt exit overhead: returns to preempting task", - end_time, - 1, - 0, - 0 - ); - - fflush( stdout ); - - /* - * Switch back to the other task to exit the test. - */ - - _Thread_Dispatch_disable_level = 0; - - _Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[254].first; - - _Context_Switch_necessary = 1; - - _Thread_Dispatch(); - -} - -/* The Isr_handler() and Isr_handler_inner() routines are structured - * so that there will be as little entry overhead as possible included - * in the interrupt entry time. - */ - -void Isr_handler_inner( void ); - -rtems_isr Isr_handler( - rtems_vector_number vector -) -{ - end_time = Read_timer(); - - Interrupt_occurred = 1; - Isr_handler_inner(); -} - -void Isr_handler_inner( void ) -{ - - /*enable_tracing();*/ - Clear_tm27_intr(); - switch ( Interrupt_nest ) { - case 0: - Interrupt_enter_time = end_time; - break; - case 1: - Interrupt_enter_time = end_time; - Interrupt_nest = 2; - Interrupt_occurred = 0; - Lower_tm27_intr(); - Timer_initialize(); - Cause_tm27_intr(); - /* goes to a nested copy of Isr_handler */ -#if (MUST_WAIT_FOR_INTERRUPT == 1) - while ( Interrupt_occurred == 0 ); -#endif - Interrupt_return_nested_time = Read_timer(); - break; - case 2: - Interrupt_enter_nested_time = end_time; - break; - } - - Timer_initialize(); -} diff --git a/testsuites/tmtests/tm27/tm27.doc b/testsuites/tmtests/tm27/tm27.doc deleted file mode 100644 index 0de40191c6..0000000000 --- a/testsuites/tmtests/tm27/tm27.doc +++ /dev/null @@ -1,13 +0,0 @@ -# -# $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. -# - - |