当前位置:网站首页>1287_ Implementation analysis of prvtaskistasksuspended() interface in FreeRTOS
1287_ Implementation analysis of prvtaskistasksuspended() interface in FreeRTOS
2022-07-02 10:45:00 【grey_ csdn】
All learning summary : GreyZhang/g_FreeRTOS: learning notes about FreeRTOS. (github.com)
Take a look this time prvTaskIsTaskSuspended() The interface of , This interface is used to judge a task Whether it is in a suspended state . Usually , The interface implementation of this judgment class is simpler . Similar to the previous implementation of obtaining task priority , So it is with . Because its function is to query rather than modify , Yes OS The overall operating environment does not have much impact .
Many interfaces are being implemented , Task handle if NULL The default is to process the current task . But in this interface, this explanation is meaningless , As long as the task is executing the query action, it means that the current task is not suspended .
This is the main part of the interface implementation , Made a simple note . Query implementation is relatively simple , First, judge whether the task is in the linked list of suspended tasks . If not , There is no need to query directly , Definitely not a suspended task . So is it necessarily a suspended task ? In fact, it is not .
The query implemented by this interface , In fact, it realizes whether the suspended state of task non execution is triggered by the suspended action . If the suspension is caused by blocking , Nor should it return as a pending state . thus , It is not only the attribution state of a linked list element that is judged , We have to see whether the event status is valid , Because the event state represents that the task enters the suspended linked list because it is not executed due to non suspended actions .
With the rules above , The determined result can be returned as the return result .
边栏推荐
猜你喜欢
Solutions to a series of problems in sqoop job creation
2021-10-02
MYSQL环境配置
[Fantasy 4] introduction and use of UMG components (under update...)
UVM learning - object attribute of UVM phase
Rapid prototyping
stm32和電機開發(上比特系統)
01安装虚拟机
Introduction to MySQL 8 DBA foundation tutorial
Pytest-- test report allure configuration
随机推荐
"Matching" is true love, a new attitude for young people to make friends
网络通信学习
快速做出原型
07 data import sqoop
AI技术产业热点分析
Is this code PHP MySQL redundant?
Introduction and Principle notes of UE4 material
UVM - configuration mechanism
测试--面试题总结
长投学堂上面的账户安全吗?
PCL 从一个点云中提取一个子集
Allure -- common configuration items
从MediaRecord录像中读取H264参数
Flink submitter
The nanny level tutorial of flutter environment configuration makes the doctor green to the end
Sus system availability scale
转换YV12到RGB565图像转换,附YUV转RGB测试
webUI自动化学习
[jetbrain rider] an exception occurred in the construction project: the imported project "d:\visualstudio2017\ide\msbuild\15.0\bin\roslyn\microsoft.csh" was not found
07数据导入Sqoop