From d99737d8a99844bbf8056656b0e61b93c2343ade Mon Sep 17 00:00:00 2001 From: liukangcc Date: Sat, 18 Sep 2021 16:23:50 +0800 Subject: [PATCH] [update] functions annotation. --- src/clock.c | 12 ++++++------ src/ipc.c | 7 ------- src/kservice.c | 12 +++++++----- src/memheap.c | 2 +- src/signal.c | 2 ++ 5 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/clock.c b/src/clock.c index fb7ee447d2..21be3a4203 100644 --- a/src/clock.c +++ b/src/clock.c @@ -33,9 +33,9 @@ static volatile rt_tick_t rt_tick = 0; /**@{*/ /** - * @brief This function will return current tick from operating system startup + * @brief This function will return current tick from operating system startup. * - * @return Return current tick + * @return Return current tick. */ rt_tick_t rt_tick_get(void) { @@ -45,7 +45,7 @@ rt_tick_t rt_tick_get(void) RTM_EXPORT(rt_tick_get); /** - * @brief This function will set current tick + * @brief This function will set current tick. * * @param tick is the value that you will set. */ @@ -101,12 +101,12 @@ void rt_tick_increase(void) /** * @brief This function will calculate the tick from millisecond. * - * @param ms is the specified millisecond + * @param ms is the specified millisecond. * - Negative Number wait forever * - Zero not wait * - Max 0x7fffffff * - * @return Return the calculated tick + * @return Return the calculated tick. */ rt_tick_t rt_tick_from_millisecond(rt_int32_t ms) { @@ -134,7 +134,7 @@ RTM_EXPORT(rt_tick_from_millisecond); * is not an integral multiple of 1000, this function will not * provide the correct 1ms-based tick. * - * @return Return passed millisecond from boot + * @return Return passed millisecond from boot. */ RT_WEAK rt_tick_t rt_tick_get_millisecond(void) { diff --git a/src/ipc.c b/src/ipc.c index 57ac453a68..a467c14151 100755 --- a/src/ipc.c +++ b/src/ipc.c @@ -1234,10 +1234,6 @@ RTM_EXPORT(rt_mutex_control); * * @param name is a pointer to the name that given to the event. * - * @param value is the initial value for the event. - * If want to share resources, you should initialize the value as the number of available resources. - * If want to signal the occurrence of an event, you should initialize the value as 0. - * * @param flag is the event flag, which determines the queuing way of how multiple threads wait * when the event is not available. * The event flag can be ONE of the following values: @@ -1741,9 +1737,6 @@ RTM_EXPORT(rt_event_control); * * @param name is a pointer to the name that given to the mailbox. * - * @param msgpoll is a pointer to the starting address of the memory space you allocated for the mailbox in advance. - * In other words, msgpoll is a pointer to the mailbox buffer of the starting address. - * * @param size is the maximum number of mails in the mailbox. * For example, when the mailbox buffer capacity is N, size is N/4. * diff --git a/src/kservice.c b/src/kservice.c index 25d34dfc47..41d81d8677 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -294,11 +294,11 @@ RTM_EXPORT(rt_memcpy); * address. If the destination memory does not overlap with the source memory, * the function is the same as memcpy(). * - * @param dst is the address of destination memory, points to the copied content. + * @param dest is the address of destination memory, points to the copied content. * * @param src is the address of source memory, point to the data source to be copied. * - * @param count is the copied length. + * @param n is the copied length. * * @return The address of destination memory. */ @@ -590,9 +590,11 @@ RTM_EXPORT(rt_show_version); /** * This function will duplicate a string. * - * @param s the string to be duplicated + * @param n is the string to be duplicated. * - * @return the duplicated string pointer + * @param base is support divide instructions value. + * + * @return the duplicated string pointer. */ rt_inline int divide(long long *n, int base) { @@ -1418,7 +1420,7 @@ void rt_assert_set_hook(void (*hook)(const char *ex, const char *func, rt_size_t /** * The RT_ASSERT function. * - * @param ex is the assertion condition string. + * @param ex_string is the assertion condition string. * * @param func is the function name when assertion. * diff --git a/src/memheap.c b/src/memheap.c index 8422b1d802..f9da3ac015 100644 --- a/src/memheap.c +++ b/src/memheap.c @@ -1058,7 +1058,7 @@ void rt_memory_info(rt_uint32_t *total, /** * @brief This function will print the used memheap infomation. * - * @param memheap is a pointer of the memheap object. + * @param mh is a pointer of the memheap object. */ void dump_used_memheap(struct rt_memheap *mh) { diff --git a/src/signal.c b/src/signal.c index e630c0dd97..14201ee948 100644 --- a/src/signal.c +++ b/src/signal.c @@ -217,6 +217,8 @@ void *rt_signal_check(void* context) * * @param signo is a specific signal value (range: 0 ~ RT_SIG_MAX). * + * @param handler is sets the processing of signal value. + * * @return Return the old processing function of this signal. ONLY When the * return value is SIG_ERR, the operation is failed. */