[rtems commit] libmisc: Add top to cpuusage.
Joel Sherrill
joel.sherrill at oarcorp.com
Thu Oct 30 14:24:59 UTC 2014
On 10/30/2014 8:39 AM, Sebastian Huber wrote:
> 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];
> ^
Jennifer and I just looked through my build logs from overnight
and didn't see this.
Which BSP and configure command?
We understand the issue but want to confirm it in the right
configuration.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill 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 devel
mailing list