当前位置:网站首页>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 .
边栏推荐
猜你喜欢

Internet News: Tencent conference application market was officially launched; Soul went to Hong Kong to submit the listing application

Flutter——Canvas自定义曲线图

allure--常用配置项

Session cookies and tokens

【TS】1368- 秒懂 TypeScript 泛型工具类型!

618再次霸榜的秘密何在?耐克最新财报给出答案

Determine whether there are duplicate elements in the array

Use WinDbg to statically analyze dump files (summary of practical experience)

13. Semaphore critical zone protection

14. Code implementation of semaphore
随机推荐
618再次霸榜的秘密何在?耐克最新财报给出答案
转换YV12到RGB565图像转换,附YUV转RGB测试
SUS系统可用性量表
UWA报告使用小技巧,你get了吗?(第四弹)
Introduction and Principle notes of UE4 material
Pywin32打开指定窗口
Pytest framework implements pre post
Nonlinear optimization: steepest descent method, Newton method, Gauss Newton method, Levenberg Marquardt method
[tutorial] how to make the Helpviewer help document of VisualStudio run independently
【避坑指南】Unity3D项目接入腾讯Bugly工具时遇到的坑
Postman -- use
JS settimeout() and interview questions
4. Random variables
[visual studio] every time you open a script of unity3d, a new vs2017 will be automatically reopened
"Matching" is true love, a new attitude for young people to make friends
Solutions to a series of problems in sqoop job creation
[unity3d] production progress bar - make image have the functions of filled and sliced at the same time
webUI自动化学习
Win11 arm系统配置.net core环境变量
AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘