Changeset 61c14a3 in rtems


Ignore:
Timestamp:
Jan 12, 2017, 9:14:06 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
a1e4e3bf
Parents:
3b784ba
git-author:
Sebastian Huber <sebastian.huber@…> (01/12/17 09:14:06)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/12/17 13:19:05)
Message:

cpuuse: Call printer only once

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/cpuuse/cpuusagereport.c

    r3b784ba r61c14a3  
    5252  rtems_object_get_name( the_thread->Object.id, sizeof( name ), name );
    5353
    54   rtems_printf(
    55     ctx->printer,
    56     " 0x%08" PRIx32 " | %-38s |",
    57     the_thread->Object.id,
    58     name
    59   );
    60 
    6154  _Thread_Get_CPU_time_used( the_thread, &used );
    6255  _TOD_Get_uptime( &uptime );
    6356  _Timestamp_Subtract( &ctx->uptime_at_last_reset, &uptime, &ctx->total );
    6457  _Timestamp_Divide( &used, &ctx->total, &ival, &fval );
    65 
    66   /*
    67    * Print the information
    68    */
    69 
    7058  seconds = _Timestamp_Get_seconds( &used );
    7159  nanoseconds = _Timestamp_Get_nanoseconds( &used ) /
    7260    TOD_NANOSECONDS_PER_MICROSECOND;
    73   rtems_printf( ctx->printer,
    74     "%7" PRIu32 ".%06" PRIu32 " |%4" PRIu32 ".%03" PRIu32 "\n",
     61
     62  rtems_printf(
     63    ctx->printer,
     64    " 0x%08" PRIx32 " | %-38s |"
     65      "%7" PRIu32 ".%06" PRIu32 " |%4" PRIu32 ".%03" PRIu32 "\n",
     66    the_thread->Object.id,
     67    name,
    7568    seconds, nanoseconds,
    7669    ival, fval
Note: See TracChangeset for help on using the changeset viewer.