diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-07-24 21:36:45 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-07-24 21:36:45 +0000 |
commit | 6db3522085f1e15010e18587a031014b212fe750 (patch) | |
tree | 12f8303e583446d0ff613123be2b50b6960eb0df /testsuites/libtests | |
parent | 2007-07-24 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-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')
-rw-r--r-- | testsuites/libtests/ChangeLog | 6 | ||||
-rw-r--r-- | testsuites/libtests/cpuuse/init.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog index d1176fd6a0..8b8c99dc5f 100644 --- a/testsuites/libtests/ChangeLog +++ b/testsuites/libtests/ChangeLog @@ -1,3 +1,9 @@ +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. + 2007-06-20 Joel Sherrill <joel.sherrill@oarcorp.com> * tztest/init.c: Build when using buffered test IO. 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" ); } |