当前位置:网站首页>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 .
边栏推荐
- Instruction execution time
- 并发编程 — 如何中断/停止一个运行中的线程?
- [algorithm post interview] interview questions of a small factory
- 睿智的目标检测59——Pytorch Focal loss详解与在YoloV4当中的实现
- ethtool 原理介绍和解决网卡丢包排查思路(附ethtool源码下载)
- PHY驱动调试之 --- PHY控制器驱动(二)
- Ros2 - Service Service (IX)
- Vscode editor
- Ros2 - ros2 vs. ros1 (II)
- Technical conference arrangement
猜你喜欢

. Net core stepping on the pit practice

ROS2——功能包(六)

What is linting

NVM Downloading npm version 6.7.0... Error

Ros2 - common command line (IV)

ROS2——ROS2对比ROS1(二)

MySQL (UDF authorization)

Sum of two numbers, the numbers in the array are converted to decimal, added, and output inversely

一文揭开,测试外包公司的真实情况

Spinningup drawing curve
随机推荐
Orin 两种刷机方式
npm install -g/--save/--save-dev的区别
Rehabilitation type force deduction brush question notes D3
The differences and connections among cookies, sessions, JWT, and tokens
ROS2——配置开发环境(五)
The “mode“ argument must be integer. Received an instance of Object
Ret2xx---- common CTF template proposition in PWN
vim
乐鑫面试流程
PHY drive commissioning --- mdio/mdc interface Clause 22 and 45 (I)
PHY驱动调试之 --- MDIO/MDC接口22号和45号条款(一)
SD_CMD_SEND_SHIFT_REGISTER
Xavier CPU & GPU high load power consumption test
你心目中的数据分析 Top 1 选 Pandas 还是选 SQL?
并发编程 — 死锁排查及处理
A brief introduction to heading/pitch/roll and omega/phi/kappa
逻辑结构与物理结构
Special training of C language array
inux摄像头(mipi接口)简要说明
[nvidia] CUDA_ VISIBLE_ DEVICES