From 11290355c9454c575d56c7928a725fd95e88d6f8 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 29 Sep 1995 17:19:16 +0000 Subject: all targets compile .. tony's patches in place --- cpukit/score/cpu/hppa1.1/cpu.c | 21 ++++++++++++++++++--- cpukit/score/cpu/unix/cpu.c | 2 +- cpukit/score/include/rtems/score/heap.h | 4 ++-- cpukit/score/inline/rtems/score/heap.inl | 4 ++-- cpukit/score/macros/rtems/score/heap.inl | 4 ++-- cpukit/score/src/heap.c | 15 +++++++++++++-- 6 files changed, 38 insertions(+), 12 deletions(-) (limited to 'cpukit/score') diff --git a/cpukit/score/cpu/hppa1.1/cpu.c b/cpukit/score/cpu/hppa1.1/cpu.c index f132033595..09c5d3d54b 100644 --- a/cpukit/score/cpu/hppa1.1/cpu.c +++ b/cpukit/score/cpu/hppa1.1/cpu.c @@ -14,12 +14,13 @@ * Division Incorporated makes no representations about the * suitability of this software for any purpose. * - * $Id$ + * cpu.c,v 1.7 1995/09/19 14:49:35 joel Exp */ #include -#include -#include +#include +#include +#include void hppa_external_interrupt_initialize(void); void hppa_external_interrupt_enable(unsigned32); @@ -103,6 +104,20 @@ void _CPU_Initialize( _CPU_Table = *cpu_table; } +/*PAGE + * + * _CPU_ISR_Get_level + */ + +unsigned32 _CPU_ISR_Get_level(void) +{ + int level; + HPPA_ASM_SSM(0, level); /* change no bits; just get copy */ + if (level & HPPA_PSW_I) + return 1; + return 0; +} + /*PAGE * * _CPU_ISR_install_raw_handler diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c index 54d4104ac7..a7b2140742 100644 --- a/cpukit/score/cpu/unix/cpu.c +++ b/cpukit/score/cpu/unix/cpu.c @@ -173,7 +173,7 @@ void _CPU_Signal_initialize( void ) void _CPU_Context_From_CPU_Init() { -#if defined(hppa1_1) && defined(RTEMS_UNIXLIB) +#if defined(hppa1_1) && defined(RTEMS_UNIXLIB_SETJMP) /* * HACK - set the _SYSTEM_ID to 0x20c so that setjmp/longjmp * will handle the full 32 floating point registers. diff --git a/cpukit/score/include/rtems/score/heap.h b/cpukit/score/include/rtems/score/heap.h index affd52cd73..dd50a0de8a 100644 --- a/cpukit/score/include/rtems/score/heap.h +++ b/cpukit/score/include/rtems/score/heap.h @@ -280,11 +280,11 @@ STATIC INLINE Heap_Block *_Heap_Block_at( /*PAGE * - * _Heap_User_Block_at + * _Heap_User_block_at * */ -STATIC INLINE Heap_Block *_Heap_User_Block_at( +STATIC INLINE Heap_Block *_Heap_User_block_at( void *base ); diff --git a/cpukit/score/inline/rtems/score/heap.inl b/cpukit/score/inline/rtems/score/heap.inl index c32226852e..0d1b1231a7 100644 --- a/cpukit/score/inline/rtems/score/heap.inl +++ b/cpukit/score/inline/rtems/score/heap.inl @@ -94,11 +94,11 @@ STATIC INLINE Heap_Block *_Heap_Block_at( /*PAGE * - * _Heap_User_Block_at + * _Heap_User_block_at * */ -STATIC INLINE Heap_Block *_Heap_User_Block_at( +STATIC INLINE Heap_Block *_Heap_User_block_at( void *base ) { diff --git a/cpukit/score/macros/rtems/score/heap.inl b/cpukit/score/macros/rtems/score/heap.inl index 47df055100..94f4ff9194 100644 --- a/cpukit/score/macros/rtems/score/heap.inl +++ b/cpukit/score/macros/rtems/score/heap.inl @@ -70,11 +70,11 @@ /*PAGE * - * _Heap_User_Block_at + * _Heap_User_block_at * */ -#define _Heap_User_Block_at( _base ) \ +#define _Heap_User_block_at( _base ) \ _Heap_Block_at( \ (_base), \ -*(((unsigned32 *) (_base)) - 1) + -HEAP_BLOCK_USED_OVERHEAD \ diff --git a/cpukit/score/src/heap.c b/cpukit/score/src/heap.c index 2380678209..bccd30ccc0 100644 --- a/cpukit/score/src/heap.c +++ b/cpukit/score/src/heap.c @@ -301,7 +301,7 @@ boolean _Heap_Size_of_user_area( Heap_Block *next_block; unsigned32 the_size; - the_block = _Heap_User_Block_at( starting_address ); + the_block = _Heap_User_block_at( starting_address ); if ( !_Heap_Is_block_in( the_heap, the_block ) || _Heap_Is_block_free( the_block ) ) @@ -346,7 +346,7 @@ boolean _Heap_Free( Heap_Block *temporary_block; unsigned32 the_size; - the_block = _Heap_User_Block_at( starting_address ); + the_block = _Heap_User_block_at( starting_address ); if ( !_Heap_Is_block_in( the_heap, the_block ) || _Heap_Is_block_free( the_block ) ) { @@ -430,6 +430,8 @@ void _Heap_Walk( Heap_Block *the_block = 0; /* avoid warnings */ Heap_Block *next_block = 0; /* avoid warnings */ int notdone = 1; + int error = 0; + int passes = 0; /* * We don't want to allow walking the heap until we have @@ -455,9 +457,14 @@ void _Heap_Walk( if (the_block->back_flag != HEAP_DUMMY_FLAG) { printf("PASS: %d Back flag of 1st block isn't HEAP_DUMMY_FLAG\n", source); + error = 1; } while (notdone) { + passes++; + if (error && (passes > 10)) + abort(); + if (do_dump == TRUE) { printf("PASS: %d Block @ 0x%p Back %d, Front %d", source, the_block, @@ -477,6 +484,7 @@ void _Heap_Walk( if ( the_block->front_flag != HEAP_DUMMY_FLAG ) { next_block = _Heap_Next_block(the_block); if ( the_block->front_flag != next_block->back_flag ) { + error = 1; printf("PASS: %d Front and back flags don't match\n", source); printf(" Current Block: Back - %d, Front - %d", the_block->back_flag, the_block->front_flag); @@ -510,4 +518,7 @@ void _Heap_Walk( else the_block = next_block; } + + if (error) + abort(); } -- cgit v1.2.3