summaryrefslogtreecommitdiffstats
path: root/c/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib')
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h5
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c6
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c26
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c6
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/linkcmds1
-rw-r--r--c/src/lib/libbsp/shmdr/dump.c1
-rw-r--r--c/src/lib/libbsp/shmdr/fatal.c4
-rw-r--r--c/src/lib/libbsp/shmdr/getlq.c2
-rw-r--r--c/src/lib/libbsp/shmdr/shm.h6
-rw-r--r--c/src/lib/libbsp/shmdr/shm_driver.h6
-rw-r--r--c/src/lib/libbsp/unix/posix/include/bsp.h1
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/bspstart.c5
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/setvec.c12
-rw-r--r--c/src/lib/libc/error.c2
-rw-r--r--c/src/lib/libc/malloc.c130
-rw-r--r--c/src/lib/libcpu/hppa1.1/clock/clock.c5
-rw-r--r--c/src/lib/libmisc/error/error.c2
-rw-r--r--c/src/lib/libmisc/monitor/mon-extension.c34
-rw-r--r--c/src/lib/libmisc/monitor/mon-symbols.c8
-rw-r--r--c/src/lib/libmisc/monitor/monitor.h16
-rw-r--r--c/src/lib/libmisc/stackchk/check.c9
-rw-r--r--c/src/lib/libmisc/stackchk/internal.h4
22 files changed, 179 insertions, 112 deletions
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h b/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h
index 8bf036b22e..1f68dea214 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h
@@ -13,8 +13,8 @@
* $Id$
*/
-#ifndef __SIMHPPA_h
-#define __SIMHPPA_h
+#ifndef __PXFL_BSP_h
+#define __PXFL_BSP_h
#ifdef __cplusplus
extern "C" {
@@ -23,7 +23,6 @@ extern "C" {
#include <rtems.h>
#include <clockdrv.h>
#include <rtems/ttydrv.h>
-#include <libcsupport.h>
/*
* Define the time limits for RTEMS Test Suite test durations.
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c
index 43052e223d..f2cd34d219 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c
@@ -52,9 +52,7 @@
shm_config_table BSP_shm_cfgtbl;
-void Shm_Cause_interrupt_simhppa(
- rtems_unsigned32 node
-);
+void Shm_Cause_interrupt_pxfl( rtems_unsigned32 node );
void Shm_Get_configuration(
rtems_unsigned32 localnode,
@@ -65,7 +63,7 @@ void Shm_Get_configuration(
BSP_shm_cfgtbl.length = 16 * KILOBYTE;
BSP_shm_cfgtbl.format = SHM_BIG;
- BSP_shm_cfgtbl.cause_intr = Shm_Cause_interrupt_simhppa;
+ BSP_shm_cfgtbl.cause_intr = Shm_Cause_interrupt_pxfl;
#ifdef NEUTRAL_BIG
BSP_shm_cfgtbl.convert = NULL_CONVERT;
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c
index 50166b2b8e..fcd14428e1 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c
@@ -1,4 +1,4 @@
-/* void Shm_Cause_interrupt_simhppa( node )
+/* void Shm_Cause_interrupt_pxfl( node )
*
* This routine is the shared memory driver routine which
* generates interrupts to other CPUs.
@@ -24,13 +24,11 @@
#include <rtems.h>
#include <shm.h>
-void Shm_Cause_interrupt_simhppa(
+void Shm_Cause_interrupt_pxfl(
rtems_unsigned32 node
)
{
Shm_Interrupt_information *intr;
- rtems_unsigned8 *u8;
- rtems_unsigned16 *u16;
rtems_unsigned32 *u32;
rtems_unsigned32 value;
@@ -40,25 +38,13 @@ void Shm_Cause_interrupt_simhppa(
switch ( intr->length ) {
case NO_INTERRUPT:
break;
- case BYTE:
- u8 = (rtems_unsigned8 *)intr->address;
- fprintf(
- stderr,
- "Shm_Cause_interrupt_simhppa: Writes of unsigned8 not supported!!!\n"
- );
- rtems_shutdown_executive( 0 );
- break;
- case WORD:
- u16 = (rtems_unsigned16 *)intr->address;
- fprintf(
- stderr,
- "Shm_Cause_interrupt_simhppa: Writes of unsigned8 not supported!!!\n"
- );
- rtems_shutdown_executive( 0 );
- break;
case LONG:
u32 = (rtems_unsigned32 *)intr->address;
HPPA_ASM_STWAS( value, 0, u32 );
break;
+ default:
+ fprintf( stderr, "Shm_Cause_interrupt_pxfl: Unsupported length!!!\n" );
+ rtems_shutdown_executive( 0 );
+ break;
}
}
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c b/c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c
index e711b64fb2..9d2aa5de73 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c
@@ -55,9 +55,9 @@ set_vector( /* returns old vector */
else if ((vector >= HPPA_INTERRUPT_BSP_BASE) &&
(vector < (HPPA_INTERRUPT_BSP_BASE + HPPA_BSP_INTERRUPTS)))
{
- simhppa_interrupt_install(handler,
- vector - HPPA_INTERRUPT_BSP_BASE,
- (rtems_isr_entry *) &previous_isr);
+ pxfl_interrupt_install(handler,
+ vector - HPPA_INTERRUPT_BSP_BASE,
+ (rtems_isr_entry *) &previous_isr);
}
#endif
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds b/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds
index d6d53569f3..427adb0cd4 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds
@@ -19,6 +19,7 @@ MEMORY
}
m302 = 0xf7f000;
+_VBR = 0x000000; /* location of the VBR table (in RAM) */
SECTIONS
{
diff --git a/c/src/lib/libbsp/shmdr/dump.c b/c/src/lib/libbsp/shmdr/dump.c
index e028ab4204..dc02961138 100644
--- a/c/src/lib/libbsp/shmdr/dump.c
+++ b/c/src/lib/libbsp/shmdr/dump.c
@@ -19,7 +19,6 @@
#include <rtems.h>
#include <stdio.h>
-#include <libcsupport.h>
#include "shm.h"
diff --git a/c/src/lib/libbsp/shmdr/fatal.c b/c/src/lib/libbsp/shmdr/fatal.c
index fc1e9f8624..b36ff8da41 100644
--- a/c/src/lib/libbsp/shmdr/fatal.c
+++ b/c/src/lib/libbsp/shmdr/fatal.c
@@ -22,7 +22,9 @@
#include "shm.h"
void MPCI_Fatal(
- rtems_unsigned32 error
+ Internal_errors_Source source,
+ boolean is_internal,
+ rtems_unsigned32 error
)
{
/* Eventually need to attempt to broadcast a K_FATAL message
diff --git a/c/src/lib/libbsp/shmdr/getlq.c b/c/src/lib/libbsp/shmdr/getlq.c
index 180c33ef00..ebc5bed8b6 100644
--- a/c/src/lib/libbsp/shmdr/getlq.c
+++ b/c/src/lib/libbsp/shmdr/getlq.c
@@ -33,6 +33,7 @@ Shm_Envelope_control *Shm_Locked_queue_Get(
tmp_ecb = NULL;
Shm_Lock( lq_cb );
+
tmpfront = Shm_Convert(lq_cb->front);
if ( tmpfront != Shm_Locked_queue_End_of_list ) {
tmp_ecb = &Shm_Envelopes[ tmpfront ];
@@ -41,6 +42,7 @@ Shm_Envelope_control *Shm_Locked_queue_Get(
lq_cb->rear = Shm_Locked_queue_End_of_list;
tmp_ecb->next = Shm_Locked_queue_Not_on_list;
}
+
Shm_Unlock( lq_cb );
return( tmp_ecb );
}
diff --git a/c/src/lib/libbsp/shmdr/shm.h b/c/src/lib/libbsp/shmdr/shm.h
index 5ccb0aab6b..f4671dde97 100644
--- a/c/src/lib/libbsp/shmdr/shm.h
+++ b/c/src/lib/libbsp/shmdr/shm.h
@@ -470,7 +470,11 @@ void Shm_Locked_queue_Initialize(
/* portable routines */
void Init_env_pool();
void Shm_Print_statistics( void );
-void MPCI_Fatal( rtems_unsigned32 );
+void MPCI_Fatal(
+ Internal_errors_Source source,
+ boolean is_internal,
+ rtems_unsigned32 error
+ );
rtems_task Shm_Cause_interrupt( rtems_unsigned32 );
void Shm_Poll();
void Shm_setclockvec();
diff --git a/c/src/lib/libbsp/shmdr/shm_driver.h b/c/src/lib/libbsp/shmdr/shm_driver.h
index 5ccb0aab6b..f4671dde97 100644
--- a/c/src/lib/libbsp/shmdr/shm_driver.h
+++ b/c/src/lib/libbsp/shmdr/shm_driver.h
@@ -470,7 +470,11 @@ void Shm_Locked_queue_Initialize(
/* portable routines */
void Init_env_pool();
void Shm_Print_statistics( void );
-void MPCI_Fatal( rtems_unsigned32 );
+void MPCI_Fatal(
+ Internal_errors_Source source,
+ boolean is_internal,
+ rtems_unsigned32 error
+ );
rtems_task Shm_Cause_interrupt( rtems_unsigned32 );
void Shm_Poll();
void Shm_setclockvec();
diff --git a/c/src/lib/libbsp/unix/posix/include/bsp.h b/c/src/lib/libbsp/unix/posix/include/bsp.h
index 0b3556c80f..4b9cf3f837 100644
--- a/c/src/lib/libbsp/unix/posix/include/bsp.h
+++ b/c/src/lib/libbsp/unix/posix/include/bsp.h
@@ -24,7 +24,6 @@ extern "C" {
#include <clockdrv.h>
#include <console.h>
#include <iosupp.h>
-#include <libcsupport.h>
/*
* Define the time limits for RTEMS Test Suite test durations.
diff --git a/c/src/lib/libbsp/unix/posix/startup/bspstart.c b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
index f948d5a038..8ce3e92ecb 100644
--- a/c/src/lib/libbsp/unix/posix/startup/bspstart.c
+++ b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
@@ -195,6 +195,11 @@ bsp_postdriver_hook(void)
if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
rtems_fatal_error_occurred('STIO');
#endif
+
+#if defined(MALLOC_STATS)
+ atexit(malloc_dump);
+#endif
+
}
/*
diff --git a/c/src/lib/libbsp/unix/posix/startup/setvec.c b/c/src/lib/libbsp/unix/posix/startup/setvec.c
index 6be1e50555..9825faa19b 100644
--- a/c/src/lib/libbsp/unix/posix/startup/setvec.c
+++ b/c/src/lib/libbsp/unix/posix/startup/setvec.c
@@ -8,8 +8,6 @@
* type - 0 indicates raw hardware connect
* 1 indicates RTEMS interrupt connect
*
- * NOTE 'type' is ignored on hppa; all interrupts are owned by RTEMS
- *
* RETURNS:
* address of previous interrupt handler
*
@@ -26,16 +24,6 @@
#include <bsp.h>
-/*
- * Install an interrupt handler in the right place
- * given its vector number from cpu/hppa.h
- * There are 2 places an interrupt can be installed
- * _ISR_Vector_table
- * bsp interrupt XXX: nyi
- *
- * We decide which based on the vector number
- */
-
rtems_isr_entry
set_vector( /* returns old vector */
rtems_isr_entry handler, /* isr routine */
diff --git a/c/src/lib/libc/error.c b/c/src/lib/libc/error.c
index cfe1858e08..56224f2a56 100644
--- a/c/src/lib/libc/error.c
+++ b/c/src/lib/libc/error.c
@@ -39,7 +39,7 @@
* EXAMPLE
* if ((fd = open(pathname, O_RDNLY)) < 0)
* {
- * rtems_error(FLOSS_ERROR_ERRNO, "open of '%s' failed", pathname);
+ * rtems_error(RTEMS_ERROR_ERRNO, "open of '%s' failed", pathname);
* goto failed;
* }
*/
diff --git a/c/src/lib/libc/malloc.c b/c/src/lib/libc/malloc.c
index a7d14b14ab..8639198bed 100644
--- a/c/src/lib/libc/malloc.c
+++ b/c/src/lib/libc/malloc.c
@@ -14,9 +14,6 @@
*/
#include <rtems.h>
-#ifdef RTEMS_LIBC
-#include <memory.h>
-#endif
#include "libcsupport.h"
#ifdef RTEMS_NEWLIB
#include <sys/reent.h>
@@ -29,21 +26,30 @@
#include <errno.h>
#include <string.h>
-/*
- * XXX: Do we really need to duplicate these? It appears that they
- * only cause typing problems.
- */
+rtems_id RTEMS_Malloc_Heap;
+size_t RTEMS_Malloc_Sbrk_amount;
-#if 0
-void *malloc(size_t);
-void *calloc(size_t, size_t);
-void *realloc(void *, size_t);
-void free(void *);
-void *sbrk(size_t);
+#ifdef RTEMS_DEBUG
+#define MALLOC_STATS
#endif
-rtems_id RTEMS_Malloc_Heap;
-size_t RTEMS_Malloc_Sbrk_amount;
+#ifdef MALLOC_STATS
+#define MSBUMP(f,n) malloc_stats.f += (n)
+
+struct {
+ unsigned32 space_available; /* current size of malloc area */
+ unsigned32 malloc_calls; /* # calls to malloc */
+ unsigned32 free_calls;
+ unsigned32 realloc_calls;
+ unsigned32 calloc_calls;
+ unsigned32 max_depth; /* most ever malloc'd at 1 time */
+ unsigned64 lifetime_allocated;
+ unsigned64 lifetime_freed;
+} malloc_stats;
+
+#else /* No malloc_stats */
+#define MSBUMP(f,n)
+#endif
void RTEMS_Malloc_Initialize(
void *start,
@@ -77,9 +83,9 @@ void RTEMS_Malloc_Initialize(
old_address = u32_address;
u32_address = (u32_address + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
- /*
- * Adjust the length by whatever we aligned by
- */
+ /*
+ * adjust the length by whatever we aligned by
+ */
length -= u32_address - old_address;
}
@@ -97,12 +103,19 @@ void RTEMS_Malloc_Initialize(
rtems_build_name( 'H', 'E', 'A', 'P' ),
starting_address,
length,
- 8, /* XXX : use CPU dependent RTEMS constant */
+ CPU_ALIGNMENT,
RTEMS_DEFAULT_ATTRIBUTES,
&RTEMS_Malloc_Heap
);
if ( status != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( status );
+
+#ifdef MALLOC_STATS
+ /* zero all the stats */
+ (void) memset(&malloc_stats, 0, sizeof(malloc_stats));
+#endif
+
+ MSBUMP(space_available, length);
}
void *malloc(
@@ -115,6 +128,8 @@ void *malloc(
rtems_unsigned32 sbrk_amount;
rtems_status_code status;
+ MSBUMP(malloc_calls, 1);
+
if ( !size )
return (void *) 0;
@@ -149,11 +164,6 @@ void *malloc(
if (((rtems_unsigned32)starting_address = sbrk(the_size)) == -1)
return (void *) 0;
- /*
- fprintf(stderr, "Extended the C heap starting at 0x%x for %d bytes\n",
- (unsigned32)starting_address, the_size);
- */
-
status = rtems_region_extend(
RTEMS_Malloc_Heap,
starting_address,
@@ -161,10 +171,12 @@ void *malloc(
);
if ( status != RTEMS_SUCCESSFUL ) {
sbrk(-the_size);
- return(FALSE);
errno = ENOMEM;
return (void *) 0;
}
+
+ MSBUMP(space_available, the_size);
+
status = rtems_region_get_segment(
RTEMS_Malloc_Heap,
size,
@@ -178,6 +190,17 @@ void *malloc(
}
}
+#ifdef MALLOC_STATS
+ if (return_this)
+ {
+ unsigned32 current_depth;
+ MSBUMP(lifetime_allocated, size);
+ current_depth = malloc_stats.lifetime_allocated - malloc_stats.lifetime_freed;
+ if (current_depth > malloc_stats.max_depth)
+ malloc_stats.max_depth = current_depth;
+ }
+#endif
+
return return_this;
}
@@ -189,6 +212,8 @@ void *calloc(
register char *cptr;
int length;
+ MSBUMP(calloc_calls, 1);
+
length = nelem * elsize;
cptr = malloc( length );
if ( cptr )
@@ -206,6 +231,8 @@ void *realloc(
rtems_status_code status;
char *new_area;
+ MSBUMP(realloc_calls, 1);
+
if ( !ptr )
return malloc( size );
@@ -214,18 +241,18 @@ void *realloc(
return (void *) 0;
}
- status = rtems_region_get_segment_size( RTEMS_Malloc_Heap, ptr, &old_size );
- if ( status != RTEMS_SUCCESSFUL ) {
- errno = EINVAL;
- return (void *) 0;
- }
-
new_area = malloc( size );
if ( !new_area ) {
free( ptr );
return (void *) 0;
}
+ status = rtems_region_get_segment_size( RTEMS_Malloc_Heap, ptr, &old_size );
+ if ( status != RTEMS_SUCCESSFUL ) {
+ errno = EINVAL;
+ return (void *) 0;
+ }
+
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
@@ -239,9 +266,21 @@ void free(
{
rtems_status_code status;
+ MSBUMP(free_calls, 1);
+
if ( !ptr )
return;
+#ifdef MALLOC_STATS
+ {
+ unsigned32 size;
+ status = rtems_region_get_segment_size( RTEMS_Malloc_Heap, ptr, &size );
+ if ( status == RTEMS_SUCCESSFUL ) {
+ MSBUMP(lifetime_freed, size);
+ }
+ }
+#endif
+
status = rtems_region_return_segment( RTEMS_Malloc_Heap, ptr );
if ( status != RTEMS_SUCCESSFUL ) {
errno = EINVAL;
@@ -249,6 +288,35 @@ void free(
}
}
+#ifdef MALLOC_STATS
+/*
+ * Dump the malloc statistics
+ * May be called via atexit() (installable by our bsp) or
+ * at any time by user
+ */
+
+void malloc_dump(void)
+{
+ unsigned32 allocated = malloc_stats.lifetime_allocated - malloc_stats.lifetime_freed;
+
+ printf("Malloc stats\n");
+ printf(" avail:%uk allocated:%uk (%d%%) max:%uk (%d%%) lifetime:%Luk freed:%Luk\n",
+ (unsigned int) malloc_stats.space_available / 1024,
+ (unsigned int) allocated / 1024,
+ /* avoid float! */
+ (allocated * 100) / malloc_stats.space_available,
+ (unsigned int) malloc_stats.max_depth / 1024,
+ (malloc_stats.max_depth * 100) / malloc_stats.space_available,
+ (unsigned long long) malloc_stats.lifetime_allocated / 1024,
+ (unsigned long long) malloc_stats.lifetime_freed / 1024);
+ printf(" Call counts: malloc:%d free:%d realloc:%d calloc:%d\n",
+ malloc_stats.malloc_calls,
+ malloc_stats.free_calls,
+ malloc_stats.realloc_calls,
+ malloc_stats.calloc_calls);
+}
+#endif
+
/*
* "Reentrant" versions of the above routines implemented above.
*/
diff --git a/c/src/lib/libcpu/hppa1.1/clock/clock.c b/c/src/lib/libcpu/hppa1.1/clock/clock.c
index d91f85d440..85ecabd263 100644
--- a/c/src/lib/libcpu/hppa1.1/clock/clock.c
+++ b/c/src/lib/libcpu/hppa1.1/clock/clock.c
@@ -15,9 +15,12 @@
*/
#include <rtems.h>
-#include <bsp.h>
#include <rtems/libio.h>
+/* should get this from bsp.h, but it is not installed yet */
+rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int);
+extern rtems_configuration_table BSP_Configuration;
+
#include <stdlib.h> /* for atexit() */
extern rtems_cpu_table Cpu_table; /* owned by BSP */
diff --git a/c/src/lib/libmisc/error/error.c b/c/src/lib/libmisc/error/error.c
index cfe1858e08..56224f2a56 100644
--- a/c/src/lib/libmisc/error/error.c
+++ b/c/src/lib/libmisc/error/error.c
@@ -39,7 +39,7 @@
* EXAMPLE
* if ((fd = open(pathname, O_RDNLY)) < 0)
* {
- * rtems_error(FLOSS_ERROR_ERRNO, "open of '%s' failed", pathname);
+ * rtems_error(RTEMS_ERROR_ERRNO, "open of '%s' failed", pathname);
* goto failed;
* }
*/
diff --git a/c/src/lib/libmisc/monitor/mon-extension.c b/c/src/lib/libmisc/monitor/mon-extension.c
index 230fab9ddf..481a21e7dd 100644
--- a/c/src/lib/libmisc/monitor/mon-extension.c
+++ b/c/src/lib/libmisc/monitor/mon-extension.c
@@ -1,5 +1,5 @@
/*
- * @(#)extension.c 1.3 - 95/07/31
+ * @(#)extension.c 1.6 - 95/09/25
*
*
* RTEMS Monitor extension support
@@ -21,22 +21,22 @@ rtems_monitor_extension_canonical(
Extension_Control *rtems_extension = (Extension_Control *) extension_void;
rtems_extensions_table *e = &rtems_extension->Extension.Callouts;
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->create,
+ rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_create,
e->thread_create);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->start,
+ rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_start,
e->thread_start);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->restart,
+ rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_restart,
e->thread_restart);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->delete,
+ rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_delete,
e->thread_delete);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->tswitch,
+ rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_tswitch,
e->thread_switch);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->begin,
+ rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_begin,
e->thread_begin);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->exitted,
+ rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_exitted,
e->thread_exitted);
- rtems_monitor_symbol_canonical_by_value(&canonical_extension->fatal,
+ rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_fatal,
e->fatal);
}
@@ -72,29 +72,29 @@ rtems_monitor_extension_dump(
length += rtems_monitor_pad(18, length);
length += printf("create: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->create, verbose);
+ length += rtems_monitor_symbol_dump(&monitor_extension->e_create, verbose);
length += printf("; start: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->start, verbose);
+ length += rtems_monitor_symbol_dump(&monitor_extension->e_start, verbose);
length += printf("; restart: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->restart, verbose);
+ length += rtems_monitor_symbol_dump(&monitor_extension->e_restart, verbose);
length += printf("\n");
length = 0;
length += rtems_monitor_pad(18, length);
length += printf("delete: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->delete, verbose);
+ length += rtems_monitor_symbol_dump(&monitor_extension->e_delete, verbose);
length += printf("; switch: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->tswitch, verbose);
+ length += rtems_monitor_symbol_dump(&monitor_extension->e_tswitch, verbose);
length += printf("; begin: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->begin, verbose);
+ length += rtems_monitor_symbol_dump(&monitor_extension->e_begin, verbose);
length += printf("\n");
length = 0;
length += rtems_monitor_pad(18, length);
length += printf("exitted: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->exitted, verbose);
+ length += rtems_monitor_symbol_dump(&monitor_extension->e_exitted, verbose);
length += printf("; fatal: ");
- length += rtems_monitor_symbol_dump(&monitor_extension->fatal, verbose);
+ length += rtems_monitor_symbol_dump(&monitor_extension->e_fatal, verbose);
length += printf("\n");
length = 0;
printf("\n");
diff --git a/c/src/lib/libmisc/monitor/mon-symbols.c b/c/src/lib/libmisc/monitor/mon-symbols.c
index f0e3ed3bc2..9cbd76d280 100644
--- a/c/src/lib/libmisc/monitor/mon-symbols.c
+++ b/c/src/lib/libmisc/monitor/mon-symbols.c
@@ -184,7 +184,7 @@ rtems_symbol_string_compare(const void *e1,
void
rtems_symbol_sort(rtems_symbol_table_t *table)
{
-#ifdef simhppa
+#ifdef RTEMS_ON_SIMULATOR
printf("Sorting symbols ... "); /* so slow we need a msg */
fflush(stdout);
#endif
@@ -195,7 +195,7 @@ rtems_symbol_sort(rtems_symbol_table_t *table)
qsort((void *) table->symbols, (size_t) table->next,
sizeof(rtems_symbol_t), rtems_symbol_string_compare);
-#ifdef simhppa
+#ifdef RTEMS_ON_SIMULATOR
/* so slow we need a msg */
printf("done\n");
#endif
@@ -401,11 +401,11 @@ rtems_monitor_symbol_dump(
{
if (canonical_symbol->offset == 0)
length += printf("%.*s",
- sizeof(canonical_symbol->name),
+ (int) sizeof(canonical_symbol->name),
canonical_symbol->name);
else
length += printf("<%.*s+0x%x>",
- sizeof(canonical_symbol->name),
+ (int) sizeof(canonical_symbol->name),
canonical_symbol->name,
canonical_symbol->offset);
if (verbose)
diff --git a/c/src/lib/libmisc/monitor/monitor.h b/c/src/lib/libmisc/monitor/monitor.h
index c9df923928..2ee03f570b 100644
--- a/c/src/lib/libmisc/monitor/monitor.h
+++ b/c/src/lib/libmisc/monitor/monitor.h
@@ -140,14 +140,14 @@ typedef struct {
rtems_id id;
rtems_name name;
/* end of common portion */
- rtems_monitor_symbol_t create;
- rtems_monitor_symbol_t start;
- rtems_monitor_symbol_t restart;
- rtems_monitor_symbol_t delete;
- rtems_monitor_symbol_t tswitch;
- rtems_monitor_symbol_t begin;
- rtems_monitor_symbol_t exitted;
- rtems_monitor_symbol_t fatal;
+ rtems_monitor_symbol_t e_create;
+ rtems_monitor_symbol_t e_start;
+ rtems_monitor_symbol_t e_restart;
+ rtems_monitor_symbol_t e_delete;
+ rtems_monitor_symbol_t e_tswitch;
+ rtems_monitor_symbol_t e_begin;
+ rtems_monitor_symbol_t e_exitted;
+ rtems_monitor_symbol_t e_fatal;
} rtems_monitor_extension_t;
/*
diff --git a/c/src/lib/libmisc/stackchk/check.c b/c/src/lib/libmisc/stackchk/check.c
index c2ee9a0a10..29939d6d4c 100644
--- a/c/src/lib/libmisc/stackchk/check.c
+++ b/c/src/lib/libmisc/stackchk/check.c
@@ -128,10 +128,12 @@ void Stack_check_Initialize( void )
rtems_status_code status;
Objects_Id id_ignored;
unsigned32 *p;
+#if 0
unsigned32 i;
unsigned32 class_index;
Thread_Control *the_thread;
Objects_Information *information;
+#endif
if (stack_check_initialized)
return;
@@ -420,7 +422,11 @@ void Stack_check_Dump_threads_usage(
* Stack_check_Fatal_extension
*/
-void Stack_check_Fatal_extension( unsigned32 status )
+void Stack_check_Fatal_extension(
+ Internal_errors_Source source,
+ boolean is_internal,
+ unsigned32 status
+)
{
if (status == 0)
Stack_check_Dump_usage();
@@ -443,6 +449,7 @@ void Stack_check_Dump_usage( void )
if (stack_check_initialized == 0)
return;
+ printf("Stack usage by thread\n");
printf(
" ID NAME LOW HIGH AVAILABLE USED\n"
);
diff --git a/c/src/lib/libmisc/stackchk/internal.h b/c/src/lib/libmisc/stackchk/internal.h
index 7cecbd6e1a..e98ec7e92e 100644
--- a/c/src/lib/libmisc/stackchk/internal.h
+++ b/c/src/lib/libmisc/stackchk/internal.h
@@ -77,7 +77,9 @@ void Stack_check_Switch_extension(
*/
void Stack_check_Fatal_extension(
- unsigned32
+ Internal_errors_Source source,
+ boolean is_internal,
+ unsigned32 status
);
/*