Hello Олег Мороз,
this duplicates code of the standard report function. I would instead
do the following:
1. Add an argument to the visitor function in
rtems_iterate_over_all_threads() and rename this function to
rtems_task_iterate().
2. Use rtems_task_iterate() to implement the previous
rtems_iterate_over_all_threads().
3. Implement a rtems_cpu_usage_report() based on
rtems_cpu_usage_report_with_plugin() and rtems_task_iterate() that uses
a visitor function with the following prototype void (*visitor)(XXX
total, rtems_cpu_usage *cpu_usage, void *arg). The rtems_cpu_usage is
the CPU usage of one thread.
4. Implement rtems_cpu_usage_report_with_plugin() via
rtems_cpu_usage_report().
5. Implement your new function via rtems_cpu_usage_report().
For everything we need new test cases in the testsuite.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel