diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-06-12 20:55:21 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-06-12 20:55:21 +0000 |
commit | 9b413eaef683ad383f9fbae5ea6b1f55b8acbe35 (patch) | |
tree | e4c4277b52edf92025de2ba05f60a720868e59e9 /c/src/tests/sptests/sp04/tswitch.c | |
parent | Fixed comment block at the beginning of the file for a copyright date (diff) | |
download | rtems-9b413eaef683ad383f9fbae5ea6b1f55b8acbe35.tar.bz2 |
Patch from Eric Norum to avoid printing from context switch user extension.
The array is too long and needs to be shortened.
Diffstat (limited to '')
-rw-r--r-- | c/src/tests/sptests/sp04/tswitch.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/c/src/tests/sptests/sp04/tswitch.c b/c/src/tests/sptests/sp04/tswitch.c index 3d4d553431..1301507782 100644 --- a/c/src/tests/sptests/sp04/tswitch.c +++ b/c/src/tests/sptests/sp04/tswitch.c @@ -23,6 +23,10 @@ #include "system.h" +struct taskSwitchLog taskSwitchLog[1000]; +int taskSwitchLogIndex; +volatile int testsFinished;; + rtems_extension Task_switch( rtems_tcb *unused, rtems_tcb *heir @@ -43,13 +47,13 @@ rtems_extension Task_switch( status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time ); directive_failed( status, "rtems_clock_get" ); - put_name( Task_name[ index ], FALSE ); - print_time( "- ", &time, "\n" ); - - if ( time.second >= 16 ) { - puts( "*** END OF TEST 4 ***" ); - 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: |