sapi: Documentation

This commit is contained in:
Sebastian Huber
2013-01-09 20:38:55 +01:00
parent 7f97cb3e21
commit e82fcb44d5

View File

@@ -1,6 +1,8 @@
/** /**
* @file * @file
* *
* @ingroup RBHeap
*
* @brief Red-Black Tree Heap API * @brief Red-Black Tree Heap API
*/ */
@@ -32,7 +34,7 @@ extern "C" {
/** /**
* @defgroup RBHeap Red-Black Tree Heap * @defgroup RBHeap Red-Black Tree Heap
* *
* @brief Red-Black Tree Heap API * @brief Red-Black Tree Heap API.
* *
* The red-black tree heap provides a memory allocator suitable to implement * The red-black tree heap provides a memory allocator suitable to implement
* the malloc() and free() interface. It uses a first-fit allocation strategy. * the malloc() and free() interface. It uses a first-fit allocation strategy.
@@ -144,13 +146,13 @@ struct rtems_rbheap_control {
/** /**
* @brief Initializes the red-black tree heap @a control. * @brief Initializes the red-black tree heap @a control.
* *
* @param[in, out] control is the red-black tree heap. * @param[in, out] control The red-black tree heap.
* @param[in] area_begin is the managed memory area begin. * @param[in] area_begin The managed memory area begin.
* @param[in] area_size is the managed memory area size. * @param[in] area_size The managed memory area size.
* @param[in] alignment is the minimum chunk alignment. * @param[in] alignment The minimum chunk alignment.
* @param[in] extend_descriptors is the handler to extend the available chunk * @param[in] extend_descriptors The handler to extend the available chunk
* descriptors. * descriptors.
* @param[in] handler_arg is the handler argument. * @param[in] handler_arg The handler argument.
* *
* @retval RTEMS_SUCCESSFUL Successful operation. * @retval RTEMS_SUCCESSFUL Successful operation.
* @retval RTEMS_INVALID_NUMBER The alignment is not positive. * @retval RTEMS_INVALID_NUMBER The alignment is not positive.
@@ -173,8 +175,8 @@ rtems_status_code rtems_rbheap_initialize(
* The chunk begin is aligned by the value specified in * The chunk begin is aligned by the value specified in
* rtems_rbheap_initialize(). * rtems_rbheap_initialize().
* *
* @param[in, out] control is the red-black tree heap. * @param[in, out] control The red-black tree heap.
* @param[in] size is the requested chunk size in bytes. * @param[in] size The requested chunk size in bytes.
* *
* @retval NULL Not enough free space in the heap. * @retval NULL Not enough free space in the heap.
* @retval otherwise Pointer to allocated chunk of memory. * @retval otherwise Pointer to allocated chunk of memory.
@@ -182,17 +184,16 @@ rtems_status_code rtems_rbheap_initialize(
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size); void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size);
/** /**
* @brief Frees a chunk of memory @a ptr allocated from the red-black * @brief Frees a chunk of memory @a ptr allocated from the red-black tree heap
* tree heap @a control. * @a control.
* *
* @param[in, out] control is the red-black tree heap. * @param[in, out] control The red-black tree heap.
* @param[in] ptr is a pointer to the chunk of memory. * @param[in] ptr The pointer to the chunk of memory.
* *
* @retval RTEMS_SUCCESSFUL Successful operation. * @retval RTEMS_SUCCESSFUL Successful operation.
* @retval RTEMS_INVALID_ID The chunk of memory is not a valid chunk in the * @retval RTEMS_INVALID_ID The chunk of memory is not a valid chunk in the
* red-black tree heap. * red-black tree heap.
* @retval RTEMS_INCORRECT_STATE The chunk of memory is not in the * @retval RTEMS_INCORRECT_STATE The chunk of memory is not in the right state.
* right state.
*/ */
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr); rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr);