diff options
| author | [email protected] <[email protected]> | 2010-11-29 00:04:55 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2010-11-29 00:04:55 +0000 |
| commit | 7a80d831c961d5c116fba457d3783459bbf41b6e (patch) | |
| tree | bca232bc65e37ea52c5970e47dbc5fe37fdae2d0 /src/mempool.c | |
| parent | 36a93a4e4a0174529c2b669aa6d23f03c2d10b3a (diff) | |
update doxygen comments.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1132 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/mempool.c')
| -rw-r--r-- | src/mempool.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mempool.c b/src/mempool.c index 5d91118604..4232d38a3a 100644 --- a/src/mempool.c +++ b/src/mempool.c @@ -66,15 +66,16 @@ void rt_mp_free_sethook(void (*hook)(struct rt_mempool* mp, void *block)) /*@{*/ /** - * This function will initialize a mempool object, normally which is used for static object. + * This function will initialize a memory pool object, normally which is used for + * static object. * - * @param mp the mempool 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 the operation status, RT_EOK on OK; RT_ERROR on error + * @return RT_EOK * */ rt_err_t rt_mp_init(struct rt_mempool* mp, const char* name, void *start, rt_size_t size, rt_size_t block_size) @@ -117,6 +118,13 @@ rt_err_t rt_mp_init(struct rt_mempool* mp, const char* name, void *start, rt_siz return RT_EOK; } +/** + * This function will detach a memory pool from system object management. + * + * @param mp the memory pool object + * + * @return RT_EOK + */ rt_err_t rt_mp_detach(struct rt_mempool* mp) { struct rt_thread* thread; @@ -217,7 +225,7 @@ rt_mp_t rt_mp_create(const char* name, rt_size_t block_count, rt_size_t block_si * * @param mp the memory pool object * - * @return the operation status, RT_EOK on OK; -RT_ERROR on error + * @return RT_EOK * */ rt_err_t rt_mp_delete(rt_mp_t mp) @@ -276,7 +284,7 @@ rt_err_t rt_mp_delete(rt_mp_t mp) * @param mp the memory pool object * @param time the waiting time * - * @return the allocated memory block + * @return the allocated memory block or RT_NULL on allocated failed * */ void *rt_mp_alloc (rt_mp_t mp, rt_int32_t time) |
