diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2003-11-11 00:54:36 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2003-11-11 00:54:36 +0000 |
commit | 04e934a89e46f668c770c063a6969ceafd213731 (patch) | |
tree | c75eab30e1130223b4208be7fc8ee49144d6e02c /c/src/tests/libtests/rtmonuse/task1.c | |
parent | 2003-11-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-04e934a89e46f668c770c063a6969ceafd213731.tar.bz2 |
2003-11-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* cpuuse/.cvsignore: Remove.
* cpuuse/Makefile.am: Remove.
* cpuuse/cpuuse.scn: Remove.
* cpuuse/init.c: Remove.
* cpuuse/system.h: Remove.
* cpuuse/task1.c: Remove.
* cpuuse/task2.c: Remove.
* cpuuse/task3.c: Remove.
* cpuuse/tswitch.c: Remove.
* .cvsignore: Remove.
* ChangeLog: Remove.
* Makefile.am: Remove.
* README: Remove.
* configure.ac: Remove.
* libtests.am: Remove.
* malloctest/.cvsignore: Remove.
* malloctest/Makefile.am: Remove.
* malloctest/init.c: Remove.
* malloctest/malloctest.scn: Remove.
* malloctest/system.h: Remove.
* malloctest/task1.c: Remove.
* monitor/.cvsignore: Remove.
* monitor/Makefile.am: Remove.
* monitor/init.c: Remove.
* monitor/system.h: Remove.
* putenvtest/.cvsignore: Remove.
* putenvtest/Makefile.am: Remove.
* putenvtest/init.c: Remove.
* rtems++/.cvsignore: Remove.
* rtems++/Init.cc: Remove.
* rtems++/Makefile.am: Remove.
* rtems++/System.h: Remove.
* rtems++/Task1.cc: Remove.
* rtems++/Task2.cc: Remove.
* rtems++/Task3.cc: Remove.
* rtems++/rtems++.doc: Remove.
* rtems++/rtems++.scn: Remove.
* rtmonuse/.cvsignore: Remove.
* rtmonuse/Makefile.am: Remove.
* rtmonuse/getall.c: Remove.
* rtmonuse/init.c: Remove.
* rtmonuse/rtmonuse.scn: Remove.
* rtmonuse/system.h: Remove.
* rtmonuse/task1.c: Remove.
* stackchk/.cvsignore: Remove.
* stackchk/Makefile.am: Remove.
* stackchk/blow.c: Remove.
* stackchk/init.c: Remove.
* stackchk/stackchk.scn: Remove.
* stackchk/system.h: Remove.
* stackchk/task1.c: Remove.
* termios/.cvsignore: Remove.
* termios/Makefile.am: Remove.
* termios/README: Remove.
* termios/init.c: Remove.
Diffstat (limited to '')
-rw-r--r-- | c/src/tests/libtests/rtmonuse/task1.c | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/c/src/tests/libtests/rtmonuse/task1.c b/c/src/tests/libtests/rtmonuse/task1.c deleted file mode 100644 index aae5cce94b..0000000000 --- a/c/src/tests/libtests/rtmonuse/task1.c +++ /dev/null @@ -1,123 +0,0 @@ -/* Task_1_through_5 - * - * This routine serves as a test task for the period capabilities of the - * Rate Monotonic 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" - -#include <rtems/cpuuse.h> -#include <rtems/rtmonuse.h> - -rtems_unsigned32 Periods[6] = { 0, 2, 2, 2, 2, 100 }; -rtems_unsigned32 Iterations[6] = { 0, 50, 50, 50, 50, 1 }; -rtems_task_priority Priorities[6] = { 0, 1, 1, 3, 4, 5 }; - -rtems_task Task_1_through_5( - rtems_unsigned32 argument -) -{ - rtems_id rmid; - rtems_id test_rmid; - rtems_unsigned32 index; - rtems_unsigned32 pass; - rtems_unsigned32 failed; - rtems_status_code status; - - status = rtems_rate_monotonic_create( argument, &rmid ); - directive_failed( status, "rtems_rate_monotonic_create" ); - put_name( Task_name[ argument ], FALSE ); - printf( "- rtems_rate_monotonic_create id = 0x%08x\n", rmid ); - - status = rtems_rate_monotonic_ident( argument, &test_rmid ); - directive_failed( status, "rtems_rate_monotonic_ident" ); - put_name( Task_name[ argument ], FALSE ); - printf( "- rtems_rate_monotonic_ident id = 0x%08x\n", test_rmid ); - - if ( rmid != test_rmid ) { - printf( "RMID's DO NOT MATCH (0x%x and 0x%x)\n", rmid, test_rmid ); - rtems_test_exit( 0 ); - } - - put_name( Task_name[ argument ], FALSE ); - printf( "- (0x%08x) period %d\n", rmid, Periods[ argument ] ); - - status = rtems_task_wake_after( 2 ); - directive_failed( status, "rtems_task_wake_after" ); - - switch ( argument ) { - case 1: - case 2: - case 3: - case 4: - while ( FOREVER ) { - Period_usage_Update( rmid ); - - status = rtems_rate_monotonic_period( rmid, Periods[ argument ] ); - directive_failed( status, "rtems_rate_monotonic_period" ); - Count.count[ argument ]++; - } - break; - case 5: - pass = 0; - failed = 0; - - status = rtems_rate_monotonic_period( rmid, Periods[ argument ] ); - directive_failed( status, "rtems_rate_monotonic_period 1 of TA5" ); - - Get_all_counters(); - - while ( FOREVER ) { - Period_usage_Update( rmid ); - - status = rtems_rate_monotonic_period( rmid, Periods[ argument ] ); - directive_failed( status, "rtems_rate_monotonic_period 2 of TA5" ); - - Get_all_counters(); - - for( index = 1 ; index <= 4 ; index++ ) { - if ( Temporary_count.count[ index ] != Iterations[ index ] ) { - puts_nocr( "FAIL -- " ); - put_name ( Task_name[ index ], FALSE ); - printf ( " Actual=%d, Expected=%d\n", - Temporary_count.count[ index ], - Iterations[ index ] - ); - failed += 1; - } - } - - if ( failed == 5 ) - rtems_test_exit( 0 ); - - pass += 1; - - printf( "TA5 - PERIODS CHECK OK (%d)\n", pass ); - - fflush( stdout ); - - if ( pass == 10 ) { - puts( "*** END OF RATE MONOTONIC PERIOD STATISTICS TEST ***" ); - CPU_usage_Dump(); - Period_usage_Dump(); - rtems_test_exit( 0 ); - } - - } - break; - } -} |