summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-21 09:16:19 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-21 10:26:11 +0200
commit4f1da72e7f4c89cd15437439862f2bc6085f44a3 (patch)
treeb2c65100bb5ad9373fc44e369955f917c7798c44 /cpukit/score/include
parentIMFS: Fix reference count for debug enabled (diff)
downloadrtems-4f1da72e7f4c89cd15437439862f2bc6085f44a3.tar.bz2
score: _Heap_Protection_free_all_delayed_blocks()
Add and use _Heap_Protection_free_all_delayed_blocks() to prevent test suite failures if RTEMS_DEBUG is defined.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/rtems/score/heap.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/heap.h b/cpukit/score/include/rtems/score/heap.h
index 80b3fd2404..2937490896 100644
--- a/cpukit/score/include/rtems/score/heap.h
+++ b/cpukit/score/include/rtems/score/heap.h
@@ -734,6 +734,7 @@ Heap_Block *_Heap_Block_allocate(
#define _Heap_Protection_block_initialize( heap, block ) ((void) 0)
#define _Heap_Protection_block_check( heap, block ) ((void) 0)
#define _Heap_Protection_block_error( heap, block ) ((void) 0)
+ #define _Heap_Protection_free_all_delayed_blocks( heap ) ((void) 0)
#else
static inline void _Heap_Protection_block_initialize(
Heap_Control *heap,
@@ -758,6 +759,16 @@ Heap_Block *_Heap_Block_allocate(
{
(*heap->Protection.block_error)( heap, block );
}
+
+ static inline void _Heap_Protection_free_all_delayed_blocks( Heap_Control *heap )
+ {
+ uintptr_t large = 0
+ - (uintptr_t) HEAP_BLOCK_HEADER_SIZE
+ - (uintptr_t) HEAP_ALLOC_BONUS
+ - (uintptr_t) 1;
+ void *p = _Heap_Allocate( heap, large );
+ _Heap_Free( heap, p );
+ }
#endif
/** @} */