|
在FreeRTOS的task.h,
- <div>struct tskTaskControlBlock; /* The old naming convention is used to prevent breaking kernel aware debuggers. */</div><div>typedef struct tskTaskControlBlock * TaskHandle_t;</div>
复制代码 在task.c里,
- <div><div>typedef struct tskTaskControlBlock /* The old naming convention is used to prevent breaking kernel aware debuggers. */</div><div>{</div></div><div> /*省略N多结构体成员*/</div><div>} tskTCB;</div>
复制代码 我有两个不懂的.
1, struct tskTaskControlBlock; 这是什么骚操作.
2,typedef struct tskTaskControlBlock * TaskHandle_t; 这个语句不是会报错吗, 因为结构体类型在这之前未定义(因为躲在task.c文件里,这里不知道). 但是实际没报错. 那么推测1语句就是为了2语句而写的吗.
|
|