Changeset e482c592 in rtems for cpukit/libmisc/cpuuse/cpuuse.c


Ignore:
Timestamp:
Dec 11, 2003, 2:21:00 PM (16 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
868b28e5
Parents:
028e84cf
Message:

2003-12-11 Joel Sherrill <joel@…>

PR 540/rtems_misc

  • cpuuse/cpuuse.c, rtmonuse/rtmonuse.c: Correct object name printing.
File:
1 edited

Legend:

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

    r028e84cf re482c592  
    4141  Objects_Information *information;
    4242  unsigned32           u32_name;
     43  char                *cname;
    4344  char                 name[5];
    4445  unsigned32           total_units = 0;
     
    8081          continue;
    8182
    82         if ( information->is_string )
    83           u32_name = *(unsigned32 *)the_thread->Object.name;
    84         else
     83        if ( information->is_string ) {
     84          cname = the_thread->Object.name;
     85          name[ 0 ] = cname[0];
     86          name[ 1 ] = cname[1];
     87          name[ 2 ] = cname[2];
     88          name[ 3 ] = cname[3];
     89          name[ 4 ] = '\0';
     90        } else {
    8591          u32_name = (unsigned32)the_thread->Object.name;
    86 
    87         name[ 0 ] = (u32_name >> 24) & 0xff;
    88         name[ 1 ] = (u32_name >> 16) & 0xff;
    89         name[ 2 ] = (u32_name >>  8) & 0xff;
    90         name[ 3 ] = (u32_name >>  0) & 0xff;
    91         name[ 4 ] = '\0';
     92          name[ 0 ] = (u32_name >> 24) & 0xff;
     93          name[ 1 ] = (u32_name >> 16) & 0xff;
     94          name[ 2 ] = (u32_name >>  8) & 0xff;
     95          name[ 3 ] = (u32_name >>  0) & 0xff;
     96          name[ 4 ] = '\0';
     97        }
    9298
    9399        if ( !isprint(name[0]) ) name[0] = '*';
Note: See TracChangeset for help on using the changeset viewer.