Question in Heap code (/score/inline/heap.inl)
Kim, Jeong-Hwan
frog at lgic.co.kr
Thu Mar 23 07:16:39 UTC 2000
Hi, everyone
I have a question in /score/inline/heap.inl.
The routine for returning the head or the tail of HEAP has a following code.
Is the code right ?
Why is the pointer mark attached to the heap argument ?
It means "&(the_heap->start)" and &(the_heap->tail).
Then, does the return value point the tail or start of the block list right ???
Aren't the start and final variables pointers themselves ?
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Head (
Heap_Control *the_heap
)
{
return (Heap_Block *)&the_heap->start;
}
/*PAGE
*
* _Heap_Tail
*
* DESCRIPTION:
*
* This function returns the tail of the specified heap.
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Tail (
Heap_Control *the_heap
)
{
return (Heap_Block *)&the_heap->final;
}
Kim
More information about the users
mailing list