当前位置:网站首页>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 .
边栏推荐
- [Lua] summary of common knowledge points (including common interview sites)
- Retrofit's callback hell is really vulnerable in kotlin synergy mode!
- Pytest learning --base
- [unity3d] cannot correctly obtain the attribute value of recttransform, resulting in calculation error
- Operator-1初识Operator
- 《实习报告》Skywalking分布式链路追踪?
- Pywin32 opens the specified window
- [SUCTF2018]followme
- Post disaster reconstruction -- Floyd thought
- Shapiro Wilk normal analysis by SPSS
猜你喜欢
【MySQL】连接MySQL时出现异常:Connection must be valid and open
简洁、快速、节约内存的Excel处理工具EasyExcel
01安装虚拟机
[visual studio] visual studio 2019 community version cmake development environment installation (download | install relevant components | create compilation execution project | error handling)
【JetBrain Rider】构建项目出现异常:未找到导入的项目“D:\VisualStudio2017\IDE\MSBuild\15.0\Bin\Roslyn\Microsoft.CSh
2021-10-02
Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
MongoDB-快速上手MongoDB命令行的一些简单操作
[Fantasy 4] the transformation from U3D to UE4
Sus system availability scale
随机推荐
拆解美图SaaS:开着飞机换引擎
Delivery mode design of Spartacus UI of SAP e-commerce cloud
Transport Optimization abstraction
MongoDB-快速上手MongoDB命令行的一些简单操作
[pit avoidance guide] pit encountered by unity3d project when accessing Tencent bugly tool
Merge ordered sequence
[SUCTF2018]followme
Nonlinear optimization: establishment of slam model
AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘
[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
长投学堂上面的账户安全吗?
01安装虚拟机
Retrofit's callback hell is really vulnerable in kotlin synergy mode!
[Fantasy 4] introduction and use of UMG components (under update...)
[unity3d] production progress bar - make image have the functions of filled and sliced at the same time
What are the popular frameworks for swoole in 2022?
Allure -- common configuration items
SUS系统可用性量表
Blender model import UE, collision settings
Pytest learning --base