[rtems commit] libmisc: Add top to cpuusage.
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Oct 30 13:39:12 UTC 2014
On 28/10/14 16:17, Jennifer Averett wrote:
> + /* Count the number of tasks and sort this load value */
> + task_count++;
> + for (i = 0; i < RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS; i++) {
> + if (load_tasks[i]) {
> + if ((l == 0) || (l < load[i]))
> + continue;
> + for (j = (RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS - 1); j >= i; j--){
> + load_tasks[j + 1] = load_tasks[j];
> + load[j + 1] = load[j];
> + }
> + }
> + load_tasks[i] = the_thread;
> + load[i] = l;
> + break;
> + }
This breaks all ports using CPU_TIMESTAMP_USE_STRUCT_TIMESPEC:
/home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c: In
function 'rtems_cpuusage_top_thread':
/home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:117:24:
error: invalid operands to binary == (have 'Thread_CPU_usage_t' and 'int')
if ((l == 0) || (l < load[i]))
^
/home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:117:36:
error: invalid operands to binary < (have 'Thread_CPU_usage_t' and 'long long
unsigned int')
if ((l == 0) || (l < load[i]))
^
/home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:125:24:
error: incompatible types when assigning to type 'long long unsigned int' from
type 'Thread_CPU_usage_t'
load[i] = l;
^
/home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:192:13:
error: incompatible types when assigning to type 'Timestamp_Control' from type
'long long unsigned int'
ran = load[i];
^
--
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.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list