Changeset bd5762d in rtems


Ignore:
Timestamp:
Jul 23, 2008, 7:51:08 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
e6ee171
Parents:
6c71b25
Message:

2008-07-23 Joel Sherrill <joel.sherrill@…>

  • libmisc/monitor/mon-extension.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-part.c, libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-queue.c, libmisc/monitor/mon-region.c, libmisc/monitor/mon-sema.c, libmisc/monitor/mon-task.c, libmisc/monitor/monitor.h: Use rtems_object_get_name() instead of internal routine. This makes it possible to also print string names of POSIX objects. Adjust task report to realign since we can have longer names.
Location:
cpukit
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r6c71b25 rbd5762d  
     12008-07-23      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * libmisc/monitor/mon-extension.c, libmisc/monitor/mon-itask.c,
     4        libmisc/monitor/mon-part.c, libmisc/monitor/mon-prmisc.c,
     5        libmisc/monitor/mon-queue.c, libmisc/monitor/mon-region.c,
     6        libmisc/monitor/mon-sema.c, libmisc/monitor/mon-task.c,
     7        libmisc/monitor/monitor.h: Use rtems_object_get_name() instead of
     8        internal routine. This makes it possible to also print string names
     9        of POSIX objects. Adjust task report to realign since we can have
     10        longer names.
     11
    1122008-07-23      Joel Sherrill <joel.sherrill@oarcorp.com>
    213
  • cpukit/libmisc/monitor/mon-extension.c

    r6c71b25 rbd5762d  
    7070    length += rtems_monitor_dump_id(monitor_extension->id);
    7171    length += rtems_monitor_pad(11, length);
    72     length += rtems_monitor_dump_name(monitor_extension->name);
     72    length += rtems_monitor_dump_name(monitor_extension->id);
    7373
    7474    length += rtems_monitor_pad(18, length);
  • cpukit/libmisc/monitor/mon-itask.c

    r6c71b25 rbd5762d  
    9797
    9898    length += rtems_monitor_pad(7, length);
    99     length += rtems_monitor_dump_name(monitor_itask->name);
     99    length += rtems_monitor_dump_name(monitor_itask->id);
    100100
    101101    length += rtems_monitor_pad(14, length);
  • cpukit/libmisc/monitor/mon-part.c

    r6c71b25 rbd5762d  
    5353    length += rtems_monitor_dump_id(monitor_part->id);
    5454    length += rtems_monitor_pad(11, length);
    55     length += rtems_monitor_dump_name(monitor_part->name);
     55    length += rtems_monitor_dump_name(monitor_part->id);
    5656    length += rtems_monitor_pad(18, length);
    5757    length += rtems_monitor_dump_attributes(monitor_part->attribute);
  • cpukit/libmisc/monitor/mon-prmisc.c

    r6c71b25 rbd5762d  
    4444
    4545int
    46 rtems_monitor_dump_char(char ch)
    47 {
    48     if (isprint(ch))
    49         return fprintf(stdout,"%c", ch);
    50     else
    51         return fprintf(stdout,"%02x", (unsigned char)ch);
    52 }
    53 
    54 int
    5546rtems_monitor_dump_decimal(uint32_t   num)
    5647{
     
    9990
    10091int
    101 rtems_monitor_dump_name(rtems_name name)
    102 {
    103     uint32_t   i;
    104     int   length = 0;
    105     union {
    106         uint32_t   ui;
    107         char       c[4];
    108     } u;
    109 
    110     u.ui = (uint32_t  ) name;
    111 
    112 #if (CPU_BIG_ENDIAN == TRUE)
    113     for (i=0; i<sizeof(u.c); i++)
    114         length += rtems_monitor_dump_char(u.c[i]);
    115 #else
    116     for (i=0; i<sizeof(u.c); i++)
    117         length += rtems_monitor_dump_char(u.c[sizeof(u.c)-1-i]);
    118 #endif
    119     return length;
     92rtems_monitor_dump_name(rtems_id id)
     93{
     94    char name_buffer[18];
     95
     96    rtems_object_get_name( id, sizeof(name_buffer), name_buffer ); 
     97
     98    return fprintf( stdout, name_buffer );
    12099}
    121100
     
    251230rtems_monitor_dump_events(rtems_event_set events)
    252231{
    253     uint32_t   length = 0;
    254 
    255232    if (events == EVENT_SETS_NONE_PENDING)  /* value is 0 */
    256         length += fprintf(stdout,"NONE");
    257 
    258     length += rtems_monitor_dump_assoc_bitfield(rtems_monitor_events_assoc,
    259                                                 ":",
    260                                                 events);
    261     return length;
     233        return fprintf(stdout,"  NONE  ");
     234
     235    return fprintf(stdout,"%08" PRIx32, events);
    262236}
    263237
  • cpukit/libmisc/monitor/mon-queue.c

    r6c71b25 rbd5762d  
    5555    length += rtems_monitor_dump_id(monitor_queue->id);
    5656    length += rtems_monitor_pad(11, length);
    57     length += rtems_monitor_dump_name(monitor_queue->name);
     57    length += rtems_monitor_dump_name(monitor_queue->id);
    5858    length += rtems_monitor_pad(19, length);
    5959    length += rtems_monitor_dump_attributes(monitor_queue->attributes);
  • cpukit/libmisc/monitor/mon-region.c

    r6c71b25 rbd5762d  
    5454    length += rtems_monitor_dump_id(monitor_region->id);
    5555    length += rtems_monitor_pad(11, length);
    56     length += rtems_monitor_dump_name(monitor_region->name);
     56    length += rtems_monitor_dump_name(monitor_region->id);
    5757    length += rtems_monitor_pad(18, length);
    5858    length += rtems_monitor_dump_attributes(monitor_region->attribute);
  • cpukit/libmisc/monitor/mon-sema.c

    r6c71b25 rbd5762d  
    6868    length += rtems_monitor_dump_id(monitor_sema->id);
    6969    length += rtems_monitor_pad(11, length);
    70     length += rtems_monitor_dump_name(monitor_sema->name);
     70    length += rtems_monitor_dump_name(monitor_sema->id);
    7171    length += rtems_monitor_pad(18, length);
    7272    length += rtems_monitor_dump_attributes(monitor_sema->attribute);
  • cpukit/libmisc/monitor/mon-task.c

    r6c71b25 rbd5762d  
    6262{
    6363    fprintf(stdout,"\
    64   ID       NAME   PRIO   STAT   MODES  EVENTS   WAITID  WAITARG  NOTES\n");
     64  ID       NAME           PRI  STATE MODES   EVENTS    WAITID  WAITARG  NOTES\n\
     65");
    6566/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
    66670         1         2         3         4         5         6         7       */
     
    8283    length += rtems_monitor_dump_id(monitor_task->id);
    8384    length += rtems_monitor_pad(11, length);
    84     length += rtems_monitor_dump_name(monitor_task->name);
    85     length += rtems_monitor_pad(18, length);
     85    length += rtems_monitor_dump_name(monitor_task->id);
     86    length += rtems_monitor_pad(26, length);
    8687    length += rtems_monitor_dump_priority(monitor_task->priority);
    87     length += rtems_monitor_pad(24, length);
     88    length += rtems_monitor_pad(29, length);
    8889    length += rtems_monitor_dump_state(monitor_task->state);
    89     length += rtems_monitor_pad(31, length);
     90    length += rtems_monitor_pad(37, length);
    9091    length += rtems_monitor_dump_modes(monitor_task->modes);
    91     length += rtems_monitor_pad(39, length);
     92    length += rtems_monitor_pad(45, length);
    9293    length += rtems_monitor_dump_events(monitor_task->events);
    9394    if (monitor_task->wait_id)
    9495    {
    95         length += rtems_monitor_pad(47, length);
     96        length += rtems_monitor_pad(54, length);
    9697        length += rtems_monitor_dump_id(monitor_task->wait_id);
    97         length += rtems_monitor_pad(57, length);
     98        length += rtems_monitor_pad(63, length);
    9899        length += rtems_monitor_dump_hex(monitor_task->wait_args);
    99100    }
    100101
    101     length += rtems_monitor_pad(65, length);
     102    length += rtems_monitor_pad(72, length);
    102103    length += rtems_monitor_dump_notepad(monitor_task->notepad);
    103104    fprintf(stdout,"\n");
  • cpukit/libmisc/monitor/monitor.h

    r6c71b25 rbd5762d  
    402402void       rtems_monitor_separator(void);
    403403uint32_t   rtems_monitor_pad(uint32_t   dest_col, uint32_t   curr_col);
    404 int        rtems_monitor_dump_char(char   ch);
    405404int        rtems_monitor_dump_decimal(uint32_t   num);
    406405int        rtems_monitor_dump_hex(uint32_t   num);
    407406int        rtems_monitor_dump_id(rtems_id id);
    408 int        rtems_monitor_dump_name(rtems_name name);
     407int        rtems_monitor_dump_name(rtems_id id);
    409408int        rtems_monitor_dump_priority(rtems_task_priority priority);
    410409int        rtems_monitor_dump_state(States_Control state);
Note: See TracChangeset for help on using the changeset viewer.