FreeRTOS复习

更新时间:2023-05-15 12:29:08 阅读: 评论:0

FreeRTOS复习
1. FreeRTOS⼀共9K的代码,分成3部分:
a. 50%: task.c
b. 40%: queue.c
c. 6%:  hardware-dependent
Par 1:其中最主要的这9⾏代码,其他8900多⾏都是为他服务,保证real time OS始终执⾏当前最⾼优先度的task:
#define taskSELECT_HIGHEST_PRIORITY_TASK()
{
关于动物的成语/* Find the highest priority queue that contains ready tasks. */
while( listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxTopReadyPriority ] ) ) )海贼王日语
{
伊人青青操
configASSERT( uxTopReadyPriority );
--uxTopReadyPriority;
}
from的用法/* listGET_OWNER_OF_NEXT_ENTRY indexes through the list, so the tasks of
风大的成语
the same priority get an equal share of the processor time. */
listGET_OWNER_OF_NEXT_ENTRY( pxCurrentTCB, &( pxReadyTasksLists[ uxTopReadyPriority ] ) );
} /* taskSELECT_HIGHEST_PRIORITY_TASK */
项目建议书范本Part 2: 在FreeRTOS ⾥⾯,⽤TCB来代表每个ur defined task。
/*
* Task control block.  A task control block (TCB) is allocated for each task,
* and stores task state information, including a pointer to the task's context参考文献字体
* (the task's run time environment, including register values)
*/
typedef struct tskTaskControlBlock
驴肉火烧热量
{
volatile portSTACK_TYPE *pxTopOfStack;  /*。。。。。。。。。。*/
} tskTCB;
参考资料:
2. Dev Board ARM M3 LPC17xx

本文发布于:2023-05-15 12:29:08,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/899468.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:部分   项目   驴肉   服务   成语   字体
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图