summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-05 21:16:49 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-05 21:16:49 +0000
commite6faab65035987e24819292f0a3f53305cf7187c (patch)
tree797f78761a01b7b3714b094b4e9880c7fbd42e57 /cpukit
parent2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-e6faab65035987e24819292f0a3f53305cf7187c.tar.bz2
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.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/score/Makefile.am4
-rw-r--r--cpukit/score/src/heapalignupuptr.c40
3 files changed, 48 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 974483f8a0..5c60dd65f6 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -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,
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index dfbd0156d9..df91a3865f 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -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 \
diff --git a/cpukit/score/src/heapalignupuptr.c b/cpukit/score/src/heapalignupuptr.c
new file mode 100644
index 0000000000..dbfe0f83cb
--- /dev/null
+++ b/cpukit/score/src/heapalignupuptr.c
@@ -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;
+}
+
+