diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-06-12 15:00:15 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-06-12 15:00:15 +0000 |
commit | df49c60c9671e4a28e636964d744c1f59fb6cb68 (patch) | |
tree | eabd85e189514ad412a35414ba5d483dcda3ef1f /c/src/tests/libtests/cpuuse/tswitch.c | |
parent | Purged as many egcs references as possible. (diff) | |
download | rtems-df49c60c9671e4a28e636964d744c1f59fb6cb68.tar.bz2 |
Merged from 4.5.0-beta3a
Diffstat (limited to '')
-rw-r--r-- | c/src/tests/libtests/cpuuse/tswitch.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/c/src/tests/libtests/cpuuse/tswitch.c b/c/src/tests/libtests/cpuuse/tswitch.c index f083709497..56a53770a7 100644 --- a/c/src/tests/libtests/cpuuse/tswitch.c +++ b/c/src/tests/libtests/cpuuse/tswitch.c @@ -22,7 +22,9 @@ #include "system.h" -#include <rtems/cpuuse.h> +struct taskSwitchLog taskSwitchLog[1000]; +int taskSwitchLogIndex; +volatile int testsFinished;; rtems_extension Task_switch( rtems_tcb *unused, @@ -42,16 +44,18 @@ rtems_extension Task_switch( Run_count[ index ] += 1; status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time ); - directive_failed( status, "rtems_clock_get" ); + fatal_directive_status_with_level( status, RTEMS_SUCCESSFUL, + "rtems_clock_get", 1 ); - put_name( Task_name[ index ], FALSE ); - print_time( "- ", &time, "\n" ); - - if ( time.second >= 16 ) { - CPU_usage_Dump(); - puts( "*** END OF CPU USAGE LIBRARY TEST ***" ); - exit( 0 ); + if (taskSwitchLogIndex < + (sizeof taskSwitchLog / sizeof taskSwitchLog[0])) { + taskSwitchLog[taskSwitchLogIndex].taskIndex = index; + taskSwitchLog[taskSwitchLogIndex].when = time; + taskSwitchLogIndex++; } + if ( time.second >= 16 ) + testsFinished = 1; + break; case 0: |