summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline/rtems
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-19 21:43:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-19 21:43:12 +0000
commit91a3554dedcf9b1495c15ef6af69bf2d940a5d80 (patch)
tree9fb5839796274db1492a45072ea91685d9698803 /cpukit/score/inline/rtems
parentRemoved a section of code which was "#if 0"'ed. (diff)
downloadrtems-91a3554dedcf9b1495c15ef6af69bf2d940a5d80.tar.bz2
Modifications from Tony Bennett accepted to return aligned block.
Diffstat (limited to '')
-rw-r--r--cpukit/score/inline/rtems/score/heap.inl16
1 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/score/inline/rtems/score/heap.inl b/cpukit/score/inline/rtems/score/heap.inl
index c28f1a6067..b3e04a1deb 100644
--- a/cpukit/score/inline/rtems/score/heap.inl
+++ b/cpukit/score/inline/rtems/score/heap.inl
@@ -94,6 +94,22 @@ STATIC INLINE Heap_Block *_Heap_Block_at(
/*PAGE
*
+ * _Heap_User_Block_at
+ *
+ */
+
+STATIC INLINE Heap_Block *_Heap_User_Block_at(
+ void *base
+)
+{
+ unsigned32 offset;
+
+ offset = *(((unsigned32 *) base) - 1);
+ return _Heap_Block_at( base, -offset + -HEAP_BLOCK_USED_OVERHEAD);
+}
+
+/*PAGE
+ *
* _Heap_Is_previous_block_free
*
*/