CPU_usage_Dump question...

Joel Sherrill joel.sherrill at OARcorp.com
Wed Sep 10 13:14:42 UTC 2003


John schilling wrote:
> I was trying to find a way to get information about tasks (usage, id, 
> etc), and ran across the CPU_usage_Dump function. However, I have a 
> specific need to get information regarding tasks but not by having 
> CPU_usage_Dump send the info to printf. Is anyone aware of any functions 
> which would allow me to have access to the task information that 
> CPU_usage_Dump prints out as a struct or something similar?

It would be a nice idea to let CPU_usage_dump() be a wrapper which
called a user provided function indirectly with a calling sequence
something like this:

   (*func)(Thread_Control *the_thread, Objects_Id id, char *name, 

           uint32_t ticks_executed, uint32_t total)

Then the current printf could done with an indirect call.

Even better would be to rewrite this code taking advantage of
the new service rtems_iterate_over_all_threads() which was
added to the CVS trunk.


> Thanks for your time.
> 
> John Schilling
> john at jschilling.net
> http://www.jschilling.net
> 


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the users mailing list