当前位置:网站首页>1293_FreeRTOS中xTaskResumeAll()接口的实现分析
1293_FreeRTOS中xTaskResumeAll()接口的实现分析
2022-07-07 22:18:00 【grey_csdn】
全部学习汇总: GreyZhang/g_FreeRTOS: learning notes about FreeRTOS. (github.com)
这次分析的xTaskResumeAll()接口其实还是小有复杂度的,但是相关的概念清晰了理解起来不难。
进行恢复操作的前提是调度器不能够挂起。
首先,与挂起的工作做了一个反操作,主要是处理一个标志性计数器。
接着查看现在的OS中任务数目,如果任务数目大于0继续往下的处理才有意义。接下来,进行“挂起任务链表的清空”。也就是从中一个个节点取出,从挂起链表以及状态链表中移除,加入到就绪任务链表中。如果发现了高优先级的任务就绪了,标注一下后面需要进行任务调度。
如果前面发现了挂起的任务,那么复位下一次的阻塞解除时间。根据调度器“落后的”调度次数,调度tick的回调函数进行调度的追加。这个过程中处理的只是任务链表,没有实际的调度发生。如果发现需要调度,那么也需要标记一下接下来需要进行任务调度切换。
根据前面的判断信息,如果发现需要任务切换那么就执行切换。
这样,这个接口基本分析完了。但是,还是有一些概念后续需要重新理顺下,不然整个OS的状态看不清。第一个是各个链表的作用以及状态切换时候的转移关系;另一个是阻塞以及接触阻塞的操作逻辑。这些,后面作为专门的笔记进行梳理。
边栏推荐
- Usage of limit and offset (Reprint)
- One click installation with fishros in blue bridge ROS
- How to insert highlighted code blocks in WPS and word
- STM32F1與STM32CubeIDE編程實例-旋轉編碼器驅動
- C language 001: download, install, create the first C project and execute the first C language program of CodeBlocks
- [研发人员必备]paddle 如何制作自己的数据集,并显示。
- 动态库基本原理和使用方法,-fPIC 选项的来龙去脉
- Robomaster visual tutorial (10) target prediction
- Tencent security released the white paper on BOT Management | interpreting BOT attacks and exploring ways to protect
- Benchmarking Detection Transfer Learning with Vision Transformers(2021-11)
猜你喜欢
第四期SFO销毁,Starfish OS如何对SFO价值赋能?
Preliminary test of optical flow sensor: gl9306
【编程题】【Scratch二级】2019.03 垃圾分类
QT and OpenGL: loading 3D models using the open asset import library (assimp) - Part 2
从服务器到云托管,到底经历了什么?
【编程题】【Scratch二级】2019.03 绘制方形螺旋
80%的人答错,苹果logo上的叶子到底朝左还是朝右?
[leetcode] 20. Valid brackets
【推荐系统基础】正负样本采样和构造
3年经验,面试测试岗20K都拿不到了吗?这么坑?
随机推荐
Go learning notes (1) environment installation and hello world
52岁的周鸿祎,还年轻吗?
How to measure whether the product is "just needed, high frequency, pain points"
Development of a horse tourism website (realization of login, registration and exit function)
paddle入门-使用LeNet在MNIST实现图像分类方法一
Open display PDF file in web page
Traduction gratuite en un clic de plus de 300 pages de documents PDF
Pigsty: out of the box database distribution
redis你到底懂不懂之list
詹姆斯·格雷克《信息简史》读后感记录
Automated testing: robot framework is a practical skill that 90% of people want to know
80%的人答错,苹果logo上的叶子到底朝左还是朝右?
C# 泛型及性能比较
[研发人员必备]paddle 如何制作自己的数据集,并显示。
Stm32f1 and stm32cubeide programming example - rotary encoder drive
Go learning notes (2) basic types and statements (1)
【测试面试题】页面很卡的原因分析及解决方案
When creating body middleware, express Is there any difference between setting extended to true and false in urlencoded?
Benchmarking Detection Transfer Learning with Vision Transformers(2021-11)
Coindesk comments on the decentralization process of the wave field: let people see the future of the Internet