Changeset cbd849c in rtems


Ignore:
Timestamp:
Nov 1, 2004, 1:14:33 PM (17 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
85b7605
Parents:
e7ab8899
Message:

2004-11-01 Ralf Corsepius <ralf_corsepius@…>

  • monitor/monitor.h: Let rtems_monitor_config_dump return int.
  • monitor/mon-config.c: Ditto. Use PRI*N macros.
  • monitor/mon-itask.c, monitor/mon-prmisc.c: Use PRI*N macros.
Location:
cpukit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    re7ab8899 rcbd849c  
     12004-11-01      Ralf Corsepius <ralf_corsepius@rtems.org>
     2
     3        * monitor/monitor.h: Let rtems_monitor_config_dump return int.
     4        * monitor/mon-config.c: Ditto. Use PRI*N macros.
     5        * monitor/mon-itask.c, monitor/mon-prmisc.c: Use PRI*N macros.
     6
    172004-11-01      Ralf Corsepius <ralf_corsepius@rtems.org>
    28
  • cpukit/libmisc/monitor/mon-config.c

    re7ab8899 rcbd849c  
    1515#include <rtems/monitor.h>
    1616
     17#include <inttypes.h>
    1718#include <stdio.h>
    1819#include <stdlib.h>             /* strtoul() */
     
    9394
    9495
    95 void
     96int
    9697rtems_monitor_config_dump(
    9798    rtems_monitor_config_t *monitor_config,
     
    99100)
    100101{
    101     uint32_t     length = 0;
     102    int     length = 0;
    102103
    103104    length = 0;
    104105    length += fprintf(stdout,"WORKSPACE");
    105106    length += rtems_monitor_pad(DATACOL, length);
    106     length += fprintf(stdout,"start: %p;  size: 0x%x\n",
     107    length += fprintf(stdout,"start: %p;  size: 0x%" PRIx32 "\n",
    107108                     monitor_config->work_space_start,
    108109                     monitor_config->work_space_size);
     
    111112    length += fprintf(stdout,"TIME");
    112113    length += rtems_monitor_pad(DATACOL, length);
    113     length += fprintf(stdout,"usec/tick: %d;  tick/timeslice: %d;  tick/sec: %d\n",
     114    length += fprintf(stdout,"usec/tick: %" PRId32 ";  tick/timeslice: %" PRId32 ";  tick/sec: %" PRId32 "\n",
    114115                     monitor_config->microseconds_per_tick,
    115116                     monitor_config->ticks_per_timeslice,
     
    119120    length += fprintf(stdout,"MAXIMUMS");
    120121    length += rtems_monitor_pad(DATACOL, length);
    121     length += fprintf(stdout,"tasks: %d;  timers: %d;  sems: %d;  que's: %d;  ext's: %d\n",
     122    length += fprintf(stdout,"tasks: %" PRId32 ";  timers: %" PRId32 ";  sems: %" PRId32 ";  que's: %" PRId32 ";  ext's: %" PRId32 "\n",
    122123                     monitor_config->maximum_tasks,
    123124                     monitor_config->maximum_timers,
     
    127128    length = 0;
    128129    length += rtems_monitor_pad(CONTCOL, length);
    129     length += fprintf(stdout,"partitions: %d;  regions: %d;  ports: %d;  periods: %d\n",
     130    length += fprintf(stdout,"partitions: %" PRId32 ";  regions: %" PRId32 ";  ports: %" PRId32 ";  periods: %" PRId32 "\n",
    130131                     monitor_config->maximum_partitions,
    131132                     monitor_config->maximum_regions,
    132133                     monitor_config->maximum_ports,
    133134                     monitor_config->maximum_periods);
     135    return length;
    134136}
  • cpukit/libmisc/monitor/mon-itask.c

    re7ab8899 rcbd849c  
    1313#include <rtems/monitor.h>
    1414
     15#include <inttypes.h>
    1516#include <stdio.h>
    1617
     
    102103
    103104    length += rtems_monitor_pad(25, length);
    104     length += fprintf(stdout,"%d [0x%x]", monitor_itask->argument, monitor_itask->argument);
     105    length += fprintf(stdout,"%" PRId32 " [0x%" PRIx32 "]",
     106      monitor_itask->argument, monitor_itask->argument);
    105107
    106108    length += rtems_monitor_pad(39, length);
     
    114116
    115117    length += rtems_monitor_pad(66, length);
    116     length += fprintf(stdout,"%d [0x%x]", monitor_itask->stack_size, monitor_itask->stack_size);
     118    length += fprintf(stdout,"%" PRId32 " [0x%" PRIx32 "]",
     119      monitor_itask->stack_size, monitor_itask->stack_size);
    117120
    118121    fprintf(stdout,"\n");
  • cpukit/libmisc/monitor/mon-prmisc.c

    re7ab8899 rcbd849c  
    1919#include <stdio.h>
    2020#include <ctype.h>
     21#include <inttypes.h>
    2122
    2223void
     
    5455rtems_monitor_dump_decimal(uint32_t   num)
    5556{
    56     return fprintf(stdout,"%4d", num);
     57    return fprintf(stdout,"%4" PRId32, num);
    5758}
    5859
     
    6061rtems_monitor_dump_hex(uint32_t   num)
    6162{
    62     return fprintf(stdout,"0x%x", num);
     63    return fprintf(stdout,"0x%" PRIx32, num);
    6364}
    6465
     
    8586                length += fprintf(stdout,"%s", name);
    8687            else
    87                 length += fprintf(stdout,"0x%x", b);
     88                length += fprintf(stdout,"0x%" PRIx32, b);
    8889        }
    8990
     
    9495rtems_monitor_dump_id(rtems_id id)
    9596{
    96     return fprintf(stdout,"%08x", id);
     97    return fprintf(stdout,"%08" PRIx32, id);
    9798}
    9899
     
    122123rtems_monitor_dump_priority(rtems_task_priority priority)
    123124{
    124     return fprintf(stdout,"%3d", priority);
     125    return fprintf(stdout,"%3" PRId32, priority);
    125126}
    126127
     
    263264    for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
    264265        if (notepad[i])
    265             length += fprintf(stdout,"%d: 0x%x ", i, notepad[i]);
    266 
    267     return length;
    268 }
     266            length += fprintf(stdout,"%d: 0x%" PRIx32, i, notepad[i]);
     267
     268    return length;
     269}
  • cpukit/libmisc/monitor/monitor.h

    re7ab8899 rcbd849c  
    387387void      *rtems_monitor_config_next(void *, rtems_monitor_config_t *, rtems_id *);
    388388void       rtems_monitor_config_dump_header(boolean);
    389 void       rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
     389int        rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
    390390
    391391/* mpci.c */
  • cpukit/libmisc/stackchk/check.c

    re7ab8899 rcbd849c  
    144144 */
    145145
    146 uint32_t   stack_check_initialized = 0;
     146static int   stack_check_initialized = 0;
    147147
    148148void Stack_check_Initialize( void )
Note: See TracChangeset for help on using the changeset viewer.