// thread.h #ifndef __THREAD_H #define __THREAD_H #include typedef struct { uint32_t *stack_ptr; // 任务栈指针 uint32_t task_id; // 任务 ID // 其他成员:优先级、状态、等待事件等... } tcb_t; void init_task(tcb_t *tcb, void (*task_entry)(void *), void *arg); void start_first_task(void); #endif