Changeset ca5fe67 in rtems


Ignore:
Timestamp:
Aug 2, 2002, 12:43:44 AM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
90f58823
Parents:
8378eae
Message:

2002-08-01 Joel Sherrill <joel@…>

  • cpuuse/cpuuse.c (CPU_usage_Dump) : Corrected so it honors when an object name is raw versus being a string.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/libmisc/ChangeLog

    r8378eae rca5fe67  
     12002-08-01      Joel Sherrill <joel@OARcorp.com>
     2
     3        * cpuuse/cpuuse.c (CPU_usage_Dump) : Corrected so it honors when an
     4        object name is raw versus being a string.
     5
    162002-07-30      Joel Sherrill <joel@OARcorp.com>
    27
  • c/src/libmisc/cpuuse/cpuuse.c

    r8378eae rca5fe67  
    1919#include <string.h>
    2020#include <stdlib.h>
     21#include <ctype.h>
    2122
    2223#include <rtems/cpuuse.h>
     
    7576          continue;
    7677
    77         u32_name = *(unsigned32 *)the_thread->Object.name;
     78        if ( information->is_string )
     79          u32_name = *(unsigned32 *)the_thread->Object.name;
     80        else
     81          u32_name = (unsigned32)the_thread->Object.name;
    7882
    7983        name[ 0 ] = (u32_name >> 24) & 0xff;
     
    8286        name[ 3 ] = (u32_name >>  0) & 0xff;
    8387        name[ 4 ] = '\0';
     88
     89        if ( !isprint(name[0]) ) name[0] = '*';
     90        if ( !isprint(name[1]) ) name[1] = '*';
     91        if ( !isprint(name[2]) ) name[2] = '*';
     92        if ( !isprint(name[3]) ) name[3] = '*';
    8493
    8594#if defined(unix) || ( CPU_HARDWARE_FP == TRUE )
  • cpukit/libmisc/ChangeLog

    r8378eae rca5fe67  
     12002-08-01      Joel Sherrill <joel@OARcorp.com>
     2
     3        * cpuuse/cpuuse.c (CPU_usage_Dump) : Corrected so it honors when an
     4        object name is raw versus being a string.
     5
    162002-07-30      Joel Sherrill <joel@OARcorp.com>
    27
  • cpukit/libmisc/cpuuse/cpuuse.c

    r8378eae rca5fe67  
    1919#include <string.h>
    2020#include <stdlib.h>
     21#include <ctype.h>
    2122
    2223#include <rtems/cpuuse.h>
     
    7576          continue;
    7677
    77         u32_name = *(unsigned32 *)the_thread->Object.name;
     78        if ( information->is_string )
     79          u32_name = *(unsigned32 *)the_thread->Object.name;
     80        else
     81          u32_name = (unsigned32)the_thread->Object.name;
    7882
    7983        name[ 0 ] = (u32_name >> 24) & 0xff;
     
    8286        name[ 3 ] = (u32_name >>  0) & 0xff;
    8387        name[ 4 ] = '\0';
     88
     89        if ( !isprint(name[0]) ) name[0] = '*';
     90        if ( !isprint(name[1]) ) name[1] = '*';
     91        if ( !isprint(name[2]) ) name[2] = '*';
     92        if ( !isprint(name[3]) ) name[3] = '*';
    8493
    8594#if defined(unix) || ( CPU_HARDWARE_FP == TRUE )
Note: See TracChangeset for help on using the changeset viewer.