summaryrefslogtreecommitdiff
path: root/src/mempool.c
diff options
context:
space:
mode:
authoryangjie <[email protected]>2021-09-10 15:55:08 +0800
committeryangjie <[email protected]>2021-09-10 17:31:31 +0800
commita912a2f88f6b765885a6139be3ce42c388e8b767 (patch)
tree186ed9497f5443668d4718d24ed9ca4d295c7e37 /src/mempool.c
parent54b78148801668bf774eb83fb7a4ba98c762fd68 (diff)
[kernel]Normalized kernel API annotation
Diffstat (limited to 'src/mempool.c')
-rw-r--r--src/mempool.c41
1 files changed, 24 insertions, 17 deletions
diff --git a/src/mempool.c b/src/mempool.c
index 5ac87d2bc8..9b201c5f89 100644
--- a/src/mempool.c
+++ b/src/mempool.c
@@ -32,8 +32,8 @@ static void (*rt_mp_free_hook)(struct rt_mempool *mp, void *block);
/**@{*/
/**
- * This function will set a hook function, which will be invoked when a memory
- * block is allocated from memory pool.
+ * @brief This function will set a hook function, which will be invoked when a memory
+ * block is allocated from memory pool.
*
* @param hook the hook function
*/
@@ -43,8 +43,8 @@ void rt_mp_alloc_sethook(void (*hook)(struct rt_mempool *mp, void *block))
}
/**
- * This function will set a hook function, which will be invoked when a memory
- * block is released to memory pool.
+ * @brief This function will set a hook function, which will be invoked when a memory
+ * block is released to memory pool.
*
* @param hook the hook function
*/
@@ -63,13 +63,17 @@ void rt_mp_free_sethook(void (*hook)(struct rt_mempool *mp, void *block))
/**@{*/
/**
- * This function will initialize a memory pool object, normally which is used
- * for static object.
+ * @brief This function will initialize a memory pool object, normally which is used
+ * for static object.
*
* @param mp the memory pool object
+ *
* @param name the name of memory pool
+ *
* @param start the star address of memory pool
+ *
* @param size the total size of memory pool
+ *
* @param block_size the size for each block
*
* @return RT_EOK
@@ -125,9 +129,9 @@ rt_err_t rt_mp_init(struct rt_mempool *mp,
RTM_EXPORT(rt_mp_init);
/**
- * This function will detach a memory pool from system object management.
+ * @brief This function will detach a memory pool from system object management.
*
- * @param mp the memory pool object
+ * @param mp the memory pool object.
*
* @return RT_EOK
*/
@@ -172,11 +176,13 @@ RTM_EXPORT(rt_mp_detach);
#ifdef RT_USING_HEAP
/**
- * This function will create a mempool object and allocate the memory pool from
- * heap.
+ * @brief This function will create a mempool object and allocate the memory pool from
+ * heap.
*
* @param name the name of memory pool
+ *
* @param block_count the count of blocks in memory pool
+ *
* @param block_size the size for each block
*
* @return the created mempool object
@@ -241,9 +247,9 @@ rt_mp_t rt_mp_create(const char *name,
RTM_EXPORT(rt_mp_create);
/**
- * This function will delete a memory pool and release the object memory.
+ * @brief This function will delete a memory pool and release the object memory.
*
- * @param mp the memory pool object
+ * @param mp the memory pool object.
*
* @return RT_EOK
*/
@@ -293,12 +299,13 @@ RTM_EXPORT(rt_mp_delete);
#endif /* RT_USING_HEAP */
/**
- * This function will allocate a block from memory pool
+ * @brief This function will allocate a block from memory pool.
*
- * @param mp the memory pool object
- * @param time the waiting time
+ * @param mp the memory pool object.
+ *
+ * @param time the waiting time.
*
- * @return the allocated memory block or RT_NULL on allocated failed
+ * @return the allocated memory block or RT_NULL on allocated failed.
*/
void *rt_mp_alloc(rt_mp_t mp, rt_int32_t time)
{
@@ -392,7 +399,7 @@ void *rt_mp_alloc(rt_mp_t mp, rt_int32_t time)
RTM_EXPORT(rt_mp_alloc);
/**
- * This function will release a memory block
+ * @brief This function will release a memory block
*
* @param block the address of memory block to be released
*/