summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-11-01 13:14:33 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-11-01 13:14:33 +0000
commitcbd849c0dee7a1de83ff2f37b939ac671d38a685 (patch)
treed7904483168034ca94e7c78882351906f95bbefc
parente7ab8899cd31959623320e339d16296fdbf44136 (diff)
downloadrtems-cbd849c0dee7a1de83ff2f37b939ac671d38a685.tar.bz2
2004-11-01 Ralf Corsepius <ralf_corsepius@rtems.org>
* 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.
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/libmisc/monitor/mon-config.c14
-rw-r--r--cpukit/libmisc/monitor/mon-itask.c7
-rw-r--r--cpukit/libmisc/monitor/mon-prmisc.c13
-rw-r--r--cpukit/libmisc/monitor/monitor.h2
-rw-r--r--cpukit/libmisc/stackchk/check.c2
6 files changed, 28 insertions, 16 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 45afef6b00..acf86f108e 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,11 @@
2004-11-01 Ralf Corsepius <ralf_corsepius@rtems.org>
+ * 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.
+
+2004-11-01 Ralf Corsepius <ralf_corsepius@rtems.org>
+
* configure.ac: Remove -ansi (Cygwin breaks with it).
* libcsupport/include/stdint.h: Use sys/_stdint.h to setup fixed
size types.
diff --git a/cpukit/libmisc/monitor/mon-config.c b/cpukit/libmisc/monitor/mon-config.c
index 0928eca7e1..0a1780c0eb 100644
--- a/cpukit/libmisc/monitor/mon-config.c
+++ b/cpukit/libmisc/monitor/mon-config.c
@@ -14,6 +14,7 @@
#include <rtems.h>
#include <rtems/monitor.h>
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h> /* strtoul() */
@@ -92,25 +93,25 @@ INITIAL (startup) Configuration Info\n");
}
-void
+int
rtems_monitor_config_dump(
rtems_monitor_config_t *monitor_config,
boolean verbose
)
{
- uint32_t length = 0;
+ int length = 0;
length = 0;
length += fprintf(stdout,"WORKSPACE");
length += rtems_monitor_pad(DATACOL, length);
- length += fprintf(stdout,"start: %p; size: 0x%x\n",
+ length += fprintf(stdout,"start: %p; size: 0x%" PRIx32 "\n",
monitor_config->work_space_start,
monitor_config->work_space_size);
length = 0;
length += fprintf(stdout,"TIME");
length += rtems_monitor_pad(DATACOL, length);
- length += fprintf(stdout,"usec/tick: %d; tick/timeslice: %d; tick/sec: %d\n",
+ length += fprintf(stdout,"usec/tick: %" PRId32 "; tick/timeslice: %" PRId32 "; tick/sec: %" PRId32 "\n",
monitor_config->microseconds_per_tick,
monitor_config->ticks_per_timeslice,
1000000 / monitor_config->microseconds_per_tick);
@@ -118,7 +119,7 @@ rtems_monitor_config_dump(
length = 0;
length += fprintf(stdout,"MAXIMUMS");
length += rtems_monitor_pad(DATACOL, length);
- length += fprintf(stdout,"tasks: %d; timers: %d; sems: %d; que's: %d; ext's: %d\n",
+ length += fprintf(stdout,"tasks: %" PRId32 "; timers: %" PRId32 "; sems: %" PRId32 "; que's: %" PRId32 "; ext's: %" PRId32 "\n",
monitor_config->maximum_tasks,
monitor_config->maximum_timers,
monitor_config->maximum_semaphores,
@@ -126,9 +127,10 @@ rtems_monitor_config_dump(
monitor_config->maximum_extensions);
length = 0;
length += rtems_monitor_pad(CONTCOL, length);
- length += fprintf(stdout,"partitions: %d; regions: %d; ports: %d; periods: %d\n",
+ length += fprintf(stdout,"partitions: %" PRId32 "; regions: %" PRId32 "; ports: %" PRId32 "; periods: %" PRId32 "\n",
monitor_config->maximum_partitions,
monitor_config->maximum_regions,
monitor_config->maximum_ports,
monitor_config->maximum_periods);
+ return length;
}
diff --git a/cpukit/libmisc/monitor/mon-itask.c b/cpukit/libmisc/monitor/mon-itask.c
index f83d0e8561..81b54e52a3 100644
--- a/cpukit/libmisc/monitor/mon-itask.c
+++ b/cpukit/libmisc/monitor/mon-itask.c
@@ -12,6 +12,7 @@
#include <rtems.h>
#include <rtems/monitor.h>
+#include <inttypes.h>
#include <stdio.h>
/*
@@ -101,7 +102,8 @@ rtems_monitor_init_task_dump(
length += rtems_monitor_symbol_dump(&monitor_itask->entry, verbose);
length += rtems_monitor_pad(25, length);
- length += fprintf(stdout,"%d [0x%x]", monitor_itask->argument, monitor_itask->argument);
+ length += fprintf(stdout,"%" PRId32 " [0x%" PRIx32 "]",
+ monitor_itask->argument, monitor_itask->argument);
length += rtems_monitor_pad(39, length);
length += rtems_monitor_dump_priority(monitor_itask->priority);
@@ -113,7 +115,8 @@ rtems_monitor_init_task_dump(
length += rtems_monitor_dump_attributes(monitor_itask->attributes);
length += rtems_monitor_pad(66, length);
- length += fprintf(stdout,"%d [0x%x]", monitor_itask->stack_size, monitor_itask->stack_size);
+ length += fprintf(stdout,"%" PRId32 " [0x%" PRIx32 "]",
+ monitor_itask->stack_size, monitor_itask->stack_size);
fprintf(stdout,"\n");
}
diff --git a/cpukit/libmisc/monitor/mon-prmisc.c b/cpukit/libmisc/monitor/mon-prmisc.c
index 30b00fb501..93b7152930 100644
--- a/cpukit/libmisc/monitor/mon-prmisc.c
+++ b/cpukit/libmisc/monitor/mon-prmisc.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <ctype.h>
+#include <inttypes.h>
void
rtems_monitor_separator(void)
@@ -53,13 +54,13 @@ rtems_monitor_dump_char(char ch)
int
rtems_monitor_dump_decimal(uint32_t num)
{
- return fprintf(stdout,"%4d", num);
+ return fprintf(stdout,"%4" PRId32, num);
}
int
rtems_monitor_dump_hex(uint32_t num)
{
- return fprintf(stdout,"0x%x", num);
+ return fprintf(stdout,"0x%" PRIx32, num);
}
int
@@ -84,7 +85,7 @@ rtems_monitor_dump_assoc_bitfield(
if (name)
length += fprintf(stdout,"%s", name);
else
- length += fprintf(stdout,"0x%x", b);
+ length += fprintf(stdout,"0x%" PRIx32, b);
}
return length;
@@ -93,7 +94,7 @@ rtems_monitor_dump_assoc_bitfield(
int
rtems_monitor_dump_id(rtems_id id)
{
- return fprintf(stdout,"%08x", id);
+ return fprintf(stdout,"%08" PRIx32, id);
}
int
@@ -121,7 +122,7 @@ rtems_monitor_dump_name(rtems_name name)
int
rtems_monitor_dump_priority(rtems_task_priority priority)
{
- return fprintf(stdout,"%3d", priority);
+ return fprintf(stdout,"%3" PRId32, priority);
}
@@ -262,7 +263,7 @@ rtems_monitor_dump_notepad(uint32_t *notepad)
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
if (notepad[i])
- length += fprintf(stdout,"%d: 0x%x ", i, notepad[i]);
+ length += fprintf(stdout,"%d: 0x%" PRIx32, i, notepad[i]);
return length;
}
diff --git a/cpukit/libmisc/monitor/monitor.h b/cpukit/libmisc/monitor/monitor.h
index 241daada96..01a197e3ca 100644
--- a/cpukit/libmisc/monitor/monitor.h
+++ b/cpukit/libmisc/monitor/monitor.h
@@ -386,7 +386,7 @@ void *rtems_monitor_manager_next(void *, void *, rtems_id *);
void rtems_monitor_config_canonical(rtems_monitor_config_t *, void *);
void *rtems_monitor_config_next(void *, rtems_monitor_config_t *, rtems_id *);
void rtems_monitor_config_dump_header(boolean);
-void rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
+int rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
/* mpci.c */
#if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
index dd5bb0314d..87d5b585b6 100644
--- a/cpukit/libmisc/stackchk/check.c
+++ b/cpukit/libmisc/stackchk/check.c
@@ -143,7 +143,7 @@ stack_check_dope_stack(Stack_Control *stack)
* Stack_check_Initialize
*/
-uint32_t stack_check_initialized = 0;
+static int stack_check_initialized = 0;
void Stack_check_Initialize( void )
{