2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>

* score/Makefile.am: Move from inline to body to avoid path explosion
	from inlining this. Makes coverage analysis easier.
	* score/src/heapalignupuptr.c: New file.
This commit is contained in:
Joel Sherrill
2009-08-05 21:16:49 +00:00
parent abc4af35f8
commit e6faab6503
3 changed files with 48 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/Makefile.am: Move from inline to body to avoid path explosion
from inlining this. Makes coverage analysis easier.
* score/src/heapalignupuptr.c: New file.
2009-08-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/bspcmdline/bspcmdline.h, libmisc/bspcmdline/bspcmdline_get.c,

View File

@@ -117,8 +117,8 @@ endif
## HEAP_C_FILES
libscore_a_SOURCES += src/heap.c src/heapallocate.c src/heapextend.c \
src/heapfree.c src/heapsizeofuserarea.c src/heapwalk.c src/heapgetinfo.c \
src/heapgetfreeinfo.c src/heapallocatealigned.c \
src/heapresizeblock.c
src/heapgetfreeinfo.c src/heapallocatealigned.c src/heapresizeblock.c \
src/heapalignupuptr.c
## OBJECT_C_FILES
libscore_a_SOURCES += src/objectallocate.c src/objectclose.c \

View File

@@ -0,0 +1,40 @@
/*
* Heap Handler
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/system.h>
#include <rtems/score/heap.h>
/*
* This routine is NOT inlined because it has a branch which leads to
* path explosion where it is used. This makes full test coverage more
* difficult.
*/
void _Heap_Align_up_uptr (
_H_uptr_t *value,
uint32_t alignment
)
{
_H_uptr_t remainder;
_H_uptr_t v = *value;
remainder = v % alignment;
if ( remainder )
*value = v - remainder + alignment;
}