forked from Imagelibrary/rtems
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:
@@ -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>
|
2009-08-05 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* libmisc/bspcmdline/bspcmdline.h, libmisc/bspcmdline/bspcmdline_get.c,
|
* libmisc/bspcmdline/bspcmdline.h, libmisc/bspcmdline/bspcmdline_get.c,
|
||||||
|
|||||||
@@ -117,8 +117,8 @@ endif
|
|||||||
## HEAP_C_FILES
|
## HEAP_C_FILES
|
||||||
libscore_a_SOURCES += src/heap.c src/heapallocate.c src/heapextend.c \
|
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/heapfree.c src/heapsizeofuserarea.c src/heapwalk.c src/heapgetinfo.c \
|
||||||
src/heapgetfreeinfo.c src/heapallocatealigned.c \
|
src/heapgetfreeinfo.c src/heapallocatealigned.c src/heapresizeblock.c \
|
||||||
src/heapresizeblock.c
|
src/heapalignupuptr.c
|
||||||
|
|
||||||
## OBJECT_C_FILES
|
## OBJECT_C_FILES
|
||||||
libscore_a_SOURCES += src/objectallocate.c src/objectclose.c \
|
libscore_a_SOURCES += src/objectallocate.c src/objectclose.c \
|
||||||
|
|||||||
40
cpukit/score/src/heapalignupuptr.c
Normal file
40
cpukit/score/src/heapalignupuptr.c
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user