mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-06 00:35:57 +08:00
doxygen: cleanup code for group_thread_management
Some checks failed
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
Some checks failed
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
The cleanup involved three parts:
- Merging the standalone "/**@{*/" into
"@addtogroup group_thread_management"
- Changing "/**@}*/" to "/** @} group_thread_management */",
adding the group name makes it easier to find the matching "@{" part.
- Deleting the "@addtogroup" directive in "include/rtthread.h"
because this header file doesn't have doxygen comments.
All doxygen comments for function bodies are defined in other .c files.
Note, we remian two doxygen comments for rt_thread_inited_hookproto_t
and rt_thread_idle_sethook in the "include/rtthread.h".
rt_thread_inited_hookproto_t is really defined here.
For rt_thread_idle_sethook, please see FIXME comment for reason.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
@@ -591,10 +591,9 @@ typedef void (*rt_sighandler_t)(int signo);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup group_thread_management
|
* @addtogroup group_thread_management
|
||||||
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**@{*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Thread
|
* Thread
|
||||||
*/
|
*/
|
||||||
@@ -955,7 +954,7 @@ typedef struct rt_thread *rt_thread_t;
|
|||||||
#define LWP_IS_USER_MODE(t) (0)
|
#define LWP_IS_USER_MODE(t) (0)
|
||||||
#endif /* RT_USING_SMART */
|
#endif /* RT_USING_SMART */
|
||||||
|
|
||||||
/**@}*/
|
/** @} group_thread_management */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup group_thread_comm
|
* @addtogroup group_thread_comm
|
||||||
|
|||||||
@@ -131,11 +131,6 @@ void rt_timer_exit_sethook(void (*hook)(struct rt_timer *timer));
|
|||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @addtogroup group_thread_management
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* thread interface
|
* thread interface
|
||||||
*/
|
*/
|
||||||
@@ -187,6 +182,8 @@ void rt_thread_suspend_sethook(void (*hook)(rt_thread_t thread));
|
|||||||
void rt_thread_resume_sethook (void (*hook)(rt_thread_t thread));
|
void rt_thread_resume_sethook (void (*hook)(rt_thread_t thread));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @ingroup group_thread_management
|
||||||
|
*
|
||||||
* @brief Sets a hook function when a thread is initialized.
|
* @brief Sets a hook function when a thread is initialized.
|
||||||
*
|
*
|
||||||
* @param thread is the target thread that initializing
|
* @param thread is the target thread that initializing
|
||||||
@@ -201,11 +198,12 @@ RT_OBJECT_HOOKLIST_DECLARE(rt_thread_inited_hookproto_t, rt_thread_inited);
|
|||||||
*/
|
*/
|
||||||
void rt_thread_idle_init(void);
|
void rt_thread_idle_init(void);
|
||||||
#if defined(RT_USING_HOOK) || defined(RT_USING_IDLE_HOOK)
|
#if defined(RT_USING_HOOK) || defined(RT_USING_IDLE_HOOK)
|
||||||
// FIXME: Have to write doxygen comment here for rt_thread_idle_sethook/rt_thread_idle_delhook
|
// FIXME: Have to write doxygen comment here for rt_thread_idle_sethook
|
||||||
// but not in src/idle.c. Because the `rt_align(RT_ALIGN_SIZE)` in src/idle.c
|
// but not in src/idle.c. Because the `rt_align(RT_ALIGN_SIZE)` in src/idle.c
|
||||||
// will make wierd output for html document generation, i.e. can not generate
|
// will make doxygen building failed.
|
||||||
// function link to rt_thread_idle_sethook, while function link to rt_thread_idle_delhook is ok.
|
|
||||||
/**
|
/**
|
||||||
|
* @ingroup group_thread_management
|
||||||
|
*
|
||||||
* @brief This function sets a hook function to idle thread loop. When the system performs
|
* @brief This function sets a hook function to idle thread loop. When the system performs
|
||||||
* idle loop, this hook function should be invoked.
|
* idle loop, this hook function should be invoked.
|
||||||
*
|
*
|
||||||
@@ -217,14 +215,6 @@ void rt_thread_idle_init(void);
|
|||||||
* @note the hook function must be simple and never be blocked or suspend.
|
* @note the hook function must be simple and never be blocked or suspend.
|
||||||
*/
|
*/
|
||||||
rt_err_t rt_thread_idle_sethook(void (*hook)(void));
|
rt_err_t rt_thread_idle_sethook(void (*hook)(void));
|
||||||
/**
|
|
||||||
* @brief delete the idle hook on hook list.
|
|
||||||
*
|
|
||||||
* @param hook the specified hook function.
|
|
||||||
*
|
|
||||||
* @return `RT_EOK`: delete OK.
|
|
||||||
* `-RT_ENOSYS`: hook was not found.
|
|
||||||
*/
|
|
||||||
rt_err_t rt_thread_idle_delhook(void (*hook)(void));
|
rt_err_t rt_thread_idle_delhook(void (*hook)(void));
|
||||||
#endif /* defined(RT_USING_HOOK) || defined(RT_USING_IDLE_HOOK) */
|
#endif /* defined(RT_USING_HOOK) || defined(RT_USING_IDLE_HOOK) */
|
||||||
rt_thread_t rt_thread_idle_gethandler(void);
|
rt_thread_t rt_thread_idle_gethandler(void);
|
||||||
@@ -265,8 +255,6 @@ void rt_secondary_cpu_entry(void);
|
|||||||
void rt_scheduler_ipi_handler(int vector, void *param);
|
void rt_scheduler_ipi_handler(int vector, void *param);
|
||||||
#endif /* RT_USING_SMP */
|
#endif /* RT_USING_SMP */
|
||||||
|
|
||||||
/**@}*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup group_signal
|
* @addtogroup group_signal
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
15
src/idle.c
15
src/idle.c
@@ -79,6 +79,19 @@ rt_err_t rt_thread_idle_sethook(void (*hook)(void))
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @addtogroup group_thread_management
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief delete the idle hook on hook list.
|
||||||
|
*
|
||||||
|
* @param hook the specified hook function.
|
||||||
|
*
|
||||||
|
* @return `RT_EOK`: delete OK.
|
||||||
|
* `-RT_ENOSYS`: hook was not found.
|
||||||
|
*/
|
||||||
rt_err_t rt_thread_idle_delhook(void (*hook)(void))
|
rt_err_t rt_thread_idle_delhook(void (*hook)(void))
|
||||||
{
|
{
|
||||||
rt_size_t i;
|
rt_size_t i;
|
||||||
@@ -198,3 +211,5 @@ rt_thread_t rt_thread_idle_gethandler(void)
|
|||||||
|
|
||||||
return (rt_thread_t)(&idle_thread[id]);
|
return (rt_thread_t)(&idle_thread[id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @} group_thread_management */
|
||||||
|
|||||||
@@ -1582,7 +1582,7 @@ rt_err_t rt_sched_thread_bind_cpu(struct rt_thread *thread, int cpu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @} group_thread_management
|
||||||
*
|
*
|
||||||
* @endcond
|
* @endcond
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -724,7 +724,7 @@ rt_err_t rt_sched_thread_bind_cpu(struct rt_thread *thread, int cpu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @} group_thread_management
|
||||||
*
|
*
|
||||||
* @endcond
|
* @endcond
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -579,6 +579,8 @@ void rt_thread_free_sig(rt_thread_t tid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @ingroup group_thread_management
|
||||||
|
*
|
||||||
* @brief This function can be used to send any signal to any thread.
|
* @brief This function can be used to send any signal to any thread.
|
||||||
*
|
*
|
||||||
* @param tid is a pointer to the thread that receives the signal.
|
* @param tid is a pointer to the thread that receives the signal.
|
||||||
|
|||||||
@@ -294,10 +294,9 @@ static rt_err_t _thread_init(struct rt_thread *thread,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup group_thread_management
|
* @addtogroup group_thread_management
|
||||||
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**@{*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function will initialize a thread. It's used to initialize a
|
* @brief This function will initialize a thread. It's used to initialize a
|
||||||
* static thread object.
|
* static thread object.
|
||||||
@@ -1209,4 +1208,4 @@ rt_err_t rt_thread_get_name(rt_thread_t thread, char *name, rt_uint8_t name_size
|
|||||||
}
|
}
|
||||||
RTM_EXPORT(rt_thread_get_name);
|
RTM_EXPORT(rt_thread_get_name);
|
||||||
|
|
||||||
/**@}*/
|
/** @} group_thread_management */
|
||||||
|
|||||||
Reference in New Issue
Block a user