diff options
| author | guozhanxin <[email protected]> | 2021-09-10 15:52:37 +0800 |
|---|---|---|
| committer | guozhanxin <[email protected]> | 2021-09-10 15:52:50 +0800 |
| commit | ce1402f773314f5c9b1465bb6f8838b0d68188a9 (patch) | |
| tree | f394a6fb61e0f56e2a2fbe1a0a89a1579c51a176 /src | |
| parent | 921e6057aa11e52eafcbcdabbb5765359ba2f286 (diff) | |
[kernel] Improve the code comment of the components.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/components.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/components.c b/src/components.c index e156b783e4..2a4affdefb 100644 --- a/src/components.c +++ b/src/components.c @@ -78,7 +78,7 @@ static int rti_end(void) INIT_EXPORT(rti_end, "6.end"); /** - * RT-Thread Components Initialization for board + * @brief RT-Thread Components Initialization for board. */ void rt_components_board_init(void) { @@ -102,7 +102,7 @@ void rt_components_board_init(void) } /** - * RT-Thread Components Initialization + * @brief RT-Thread Components Initialization. */ void rt_components_init(void) { @@ -169,7 +169,11 @@ static rt_uint8_t main_stack[RT_MAIN_THREAD_STACK_SIZE]; struct rt_thread main_thread; #endif /* RT_USING_HEAP */ -/* the system main thread */ +/** + * @brief The system main thread. In this thread will call the rt_components_init() + * for initialization of RT-Thread Components and call the user's programming + * entry main(). + */ void main_thread_entry(void *parameter) { extern int main(void); @@ -193,6 +197,10 @@ void main_thread_entry(void *parameter) #endif } +/** + * @brief This function will create and start the main thread, but this thread + * will not run until the scheduler starts. + */ void rt_application_init(void) { rt_thread_t tid; @@ -216,6 +224,11 @@ void rt_application_init(void) rt_thread_startup(tid); } +/** + * @brief RT-Thread startup function. This function will call all levels of initialization + * functions to complete the initialization of the system, and finally start the + * scheduler. + */ int rtthread_startup(void) { rt_hw_interrupt_disable(); |
