Skip to content

Commit cad855b

Browse files
committed
同步注释
1 parent b92f8a9 commit cad855b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/scheduler_up.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,19 @@ void rt_sched_thread_startup(struct rt_thread *thread)
433433
RT_SCHED_CTX(thread).stat = RT_THREAD_SUSPEND;
434434
}
435435

436+
/**
437+
* @brief Initialize thread's scheduling private data
438+
*
439+
* @param thread Pointer to the thread control block
440+
* @param tick Initial time slice value for the thread
441+
* @param priority Initial priority of the thread
442+
*
443+
* @details This function:
444+
* - Initializes the thread's list node
445+
* - Sets initial and current priority (must be < RT_THREAD_PRIORITY_MAX)
446+
* - Initializes priority masks (number_mask, number, high_mask for >32 priorities)
447+
* - Sets initial and remaining time slice ticks
448+
*/
436449
void rt_sched_thread_init_priv(struct rt_thread *thread, rt_uint32_t tick,
437450
rt_uint8_t priority)
438451
{

0 commit comments

Comments
 (0)