summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/cpuuse
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-07-24 21:36:45 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-07-24 21:36:45 +0000
commit6db3522085f1e15010e18587a031014b212fe750 (patch)
tree12f8303e583446d0ff613123be2b50b6960eb0df /testsuites/libtests/cpuuse
parent2007-07-24 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-6db3522085f1e15010e18587a031014b212fe750.tar.bz2
2007-07-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* cpuuse/init.c: Do not delete the Init task. Leaving it suspended lets the CPU Usage Report include it. If it is deleted, the CPU time it had consumed is not listed later in the report.
Diffstat (limited to 'testsuites/libtests/cpuuse')
-rw-r--r--testsuites/libtests/cpuuse/init.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/testsuites/libtests/cpuuse/init.c b/testsuites/libtests/cpuuse/init.c
index 00af89c553..42f9f19df8 100644
--- a/testsuites/libtests/cpuuse/init.c
+++ b/testsuites/libtests/cpuuse/init.c
@@ -100,6 +100,11 @@ rtems_task Init(
status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
directive_failed( status, "rtems_task_start of TA3" );
- status = rtems_task_delete( RTEMS_SELF );
+ /*
+ * We suspend the Init task rather than delete it so it still
+ * shows up in CPU Usage Report. If we don't, the CPU Usage
+ * times will not add up to the time since last CPU Usage Reset.
+ */
+ status = rtems_task_suspend( RTEMS_SELF );
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
}