当前位置:网站首页>1292_ Implementation analysis of vtask resume() and xtask resume fromisr() in freeros
1292_ Implementation analysis of vtask resume() and xtask resume fromisr() in freeros
2022-07-06 21:39:00 【grey_ csdn】
All learning summary : GreyZhang/g_FreeRTOS: learning notes about FreeRTOS. (github.com)
Today, let's look at a relatively simple interface implementation ,vTaskResume() The implementation of the . It may be that the interface analyzed above has some precipitation , It's really not difficult to see this interface implementation this time , After all, the interface implementation involved in it has been analyzed before .
Many interfaces in the software actually don't work in my current configuration , So the rest of the code itself is not much .
Interface at the beginning , The way of assertion determines the validity of the task handle . Actually , With this , The state of one of the following conditions is confirmed , The later judgment is a little redundant when the assertion is on . The most basic judgment is to see whether the pending task handle is the handle of the current task , If it is , This operation is also meaningless . Because the current task is running , It will not be suspended ,
The basic prerequisites for processing have been met , The next step is to resume the suspended task . Of course , First of all, you have to confirm that the task is suspended . If it is , Remove from the pending task list , Then add it to the ready task list . such , The basic treatment is almost done .
If the scheduler is preemptive , At this time, we have to see whether the priority of the restored task is higher than that of the running task . If it is , That means you need to switch tasks .
This is the implementation of this interface , Relatively simple .
Look at the interruption of the safe version API, First, the validity of the handle is judged , Secondly, I looked at the effectiveness of interrupt priority . There is no need to judge the current execution Task The relationship between , Because in ISR in , Whether the scheduling is running or not is unknown .
Next , The overall treatment is the same as vTaskResume() Little difference , The only difference is the processing when the scheduler hangs .vTaskResume() Execution is in OS The scheduling code of , Therefore, the scheduler must not be suspended . But in ISR in , This is not necessarily , The state of the scheduler may be different . therefore , There is an additional scheduler pending processing .
边栏推荐
- MLP (multilayer perceptron neural network) is a multilayer fully connected neural network model.
- R language for text mining Part4 text classification
- It's not my boast. You haven't used this fairy idea plug-in!
- 1292_FreeROS中vTaskResume()以及xTaskResumeFromISR()的实现分析
- numpy 下载安装
- [Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)
- 抖音將推獨立種草App“可頌”,字節忘不掉小紅書?
- JS method to stop foreach
- VIM basic configuration and frequently used commands
- 技术分享 | 抓包分析 TCP 协议
猜你喜欢
2022 fields Award Announced! The first Korean Xu Long'er was on the list, and four post-80s women won the prize. Ukrainian female mathematicians became the only two women to win the prize in history
[Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)
guava:Collections.unmodifiableXXX创建的collection并不immutable
缓存更新策略概览(Caching Strategies Overview)
for循环中break与continue的区别——break-完全结束循环 & continue-终止本次循环
Enhance network security of kubernetes with cilium
PostgreSQL 修改数据库用户的密码
抖音將推獨立種草App“可頌”,字節忘不掉小紅書?
Five wars of Chinese Baijiu
Aike AI frontier promotion (7.6)
随机推荐
Nodejs tutorial let's create your first expressjs application with typescript
快讯:飞书玩家大会线上举行;微信支付推出“教培服务工具箱”
string的底层实现
js之遍历数组、字符串
Chris LATTNER, the father of llvm: why should we rebuild AI infrastructure software
MySQL - transaction details
Quick news: the flybook players' conference is held online; Wechat payment launched "education and training service toolbox"
Tiktok will push the independent grass planting app "praiseworthy". Can't bytes forget the little red book?
一行代码可以做些什么?
Set up a time server
@Detailed differences among getmapping, @postmapping and @requestmapping, with actual combat code (all)
JS according to the Chinese Alphabet (province) or according to the English alphabet - Za sort &az sort
[interpretation of the paper] machine learning technology for Cataract Classification / classification
Z function (extended KMP)
el-table表格——获取单击的是第几行和第几列 & 表格排序之el-table与sort-change、el-table-column与sort-method & 清除排序-clearSort
【滑动窗口】第九届蓝桥杯省赛B组:日志统计
JS学习笔记-OO创建怀疑的对象
C语言:#if、#def和#ifndef综合应用
3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
Sql: stored procedures and triggers - Notes