当前位置:网站首页>1290_ Implementation analysis of prvtaskistasksuspended() interface in FreeRTOS
1290_ Implementation analysis of prvtaskistasksuspended() interface in FreeRTOS
2022-07-05 07:01:00 【grey_ csdn】
All learning summary : GreyZhang/g_FreeRTOS: learning notes about FreeRTOS. (github.com)
I just finished analyzing the pending operation of the task , Next, analyze whether the task is a query interface implementation in suspended state . commonly , The interface implementation of this query class is always simpler .
The interface also needs to be configured with a macro definition enable before it can take effect , This is similar to the previous task suspending interface implementation . Next , First, make sure that the incoming task handle is valid .
If the task handle is valid , Then you need to check whether the task is in the suspended task list . If not , Then the query will directly get the result , This task is not suspended . otherwise , Further judgment is needed . That means , stay FreeRTOS The suspended task list in may be used in many functions , This leads to the reuse of linked lists . natural , Sometimes adding some categories to the linked list can make processing easier , But similar processing cannot be merged . therefore , The implemented kernel should be more lightweight .
If the task is in the linked list of suspended tasks , The reason for the suspension may also be the suspension caused by the event . such , Just judge whether the event caused the suspension , If not , The reason why this task is in the suspended task list is the operation of suspended tasks . such , Task is suspended .
Compared with the previous pending operation , The operation of judging whether the task is suspended is indeed simpler . The main reason has also been analyzed before , Similar attribute queries generally do not change various states, so they do not trigger task scheduling . The interface of the modified class is different , Priority and other key attributes may be involved , Task scheduling may be triggered at any time , Therefore, the complexity will be higher .
边栏推荐
- [algorithm post interview] interview questions of a small factory
- LSA Type Explanation - lsa-1 [type 1 LSA - router LSA] detailed explanation
- Xavier CPU & GPU high load power consumption test
- 【软件测试】03 -- 软件测试概述
- [Chongqing Guangdong education] National Open University 2018 autumn 0702-22t contemporary Chinese political system reference questions
- Skywalking all
- docker安装mysql并使用navicat连接
- Markdown syntax
- 基于Cortex-M3、M4的GPIO口位带操作宏定义(可总线输入输出,可用于STM32、ADuCM4050等)
- Rehabilitation type force deduction brush question notes D2
猜你喜欢
Build a microservice cluster environment locally and learn to deploy automatically
ROS2——Service服务(九)
SOC_SD_CMD_FSM
All English in the code
程序中的负数存储及类型转换
Marvell 88e1515 PHY loopback mode test
Use the Paping tool to detect TCP port connectivity
Log4qt usage of logbase in QT project
ROS2——常用命令行(四)
你心目中的数据分析 Top 1 选 Pandas 还是选 SQL?
随机推荐
postmessage通信
Get class files and attributes by reflection
Some classic recursion problems
代码中的英语全部
Xavier CPU & GPU high load power consumption test
Sum of two numbers, the numbers in the array are converted to decimal, added, and output inversely
Database mysql all
mingling
Huawei bracelet, how to add medicine reminder?
Lexin interview process
ROS2——配置开发环境(五)
[Chongqing Guangdong education] National Open University 2018 autumn 0702-22t contemporary Chinese political system reference questions
Dameng database all
睿智的目标检测59——Pytorch Focal loss详解与在YoloV4当中的实现
Marvell 88e1515 PHY loopback mode test
PHY驱动调试之 --- PHY控制器驱动(二)
Matlab在线性代数中的应用(四):相似矩阵及二次型
[algorithm post interview] interview questions of a small factory
Integer to 8-bit binary explanation (including positive and negative numbers) scope of application -127~+127
SRE核心体系了解