当前位置:网站首页>1288_ Implementation analysis of vtask resume() interface and interrupt Security version interface in FreeRTOS
1288_ Implementation analysis of vtask resume() interface and interrupt Security version interface in FreeRTOS
2022-07-02 18:02:00 【grey_ csdn】
All learning summary : GreyZhang/g_FreeRTOS: learning notes about FreeRTOS. (github.com)
The interface analysis in recent times may be relatively simple projects , The analysis went smoothly . Of course , It is also possible that the information read before has reached a certain amount, which is helpful for understanding these interfaces now .
This time, , Then analyze a simple interface vTaskResume().

It is worth noting that the above pretreatment , In fact, it is the same condition as the previous preprocessing of the interface that suspends tasks . The two processes have a little reverse meaning , It is also easy to understand why it exists at the same time .
Actually , Whether it exists at the same time is not very critical . The more valuable information for me is , These functions are actually not used in some projects I have been in contact with , Therefore, making modifications in this regard should ensure OS Cut to smaller size .
Back to the design and analysis of software code itself , First of all, it is judged here that the task to be resumed exists . In general , If the processing handle for the task is NULL It is usually the default to handle the current task , But this operation is not tenable in rationality analysis . therefore , A check assertion like this is added here .

The later part of the code is actually relatively simple , A very important point is that this operation should not deal with the current task . Because the current task must be running , If you want to do such a treatment, it must be meaningless . because , There is no possibility of suspending the currently running task . Another thing to note is the priority of the restored task , Because the task readiness with high priority may involve the processing of task scheduling .
About the task processing that really needs to be restored , First of all, the task is removed from the suspended list , Then add it to the ready task list . After adding , Determine the priority of the recovery task , After comparing with the current task priority, you can know whether the request processing of task scheduling is required next . Finally, handle the task scheduling request .


Interrupt the safe version of and normal API The main difference in processing lies in 2 spot . First of all , Interrupt the shielding of the Security version OS Interruption of custody ISR, Prevent interference . Another point , In fact, the suspension of processing tasks in interrupts does not need to consider whether the scheduler is suspended , In fact, they can be suspended , Even the current task. therefore , The task handle passed in is just to see if it is valid , I didn't judge whether it was a task being processed . And for the scheduler to hang , There is an extra linked list for temporary buffer , When the scheduler resumes, transfer the task to the ready task list .
边栏推荐
- Yilong em78p153k dip14 MCU
- 1288_FreeRTOS中vTaskResume()接口以及中断安全版本接口实现分析
- 好评率计算
- Yingguang single chip microcomputer (MCU popular science)
- Virtual lab basic experiment tutorial -7 Polarization (1)
- 透过华为军团看科技之变(六):智慧公路
- Clé de cartographie vimium
- Huimang micro IO MCU ft60f11f-mrb
- Problems needing attention in the development and debugging of Yingguang single chip microcomputer
- POJ - 1458 common subsequence (longest common subsequence)
猜你喜欢

详解Kubernetes网络模型

【Golang | gRPC】使用openssl生成证书

wps插入图片后使图片完整显示

WPS inserts a picture and displays it completely

aloam 代码阅读与总结

Chapter 15 string localization and message Dictionary (1)

Keras' deep learning practice -- gender classification based on vgg19 model

Intelligent hydropower meter energy consumption monitoring cloud platform

MySQL --- 数据库的基本概念

透过华为军团看科技之变(六):智慧公路
随机推荐
Modbus protocol communication exception
Typescript
开发一个禁止删除namespace的控制器
应广单片机开发 工规 PMC131 带AD芯片检测电池电压单片机SOP8/14
ASEMI整流桥UMB10F参数,UMB10F规格,UMB10F封装
PHP gets the number of days, hours, minutes and seconds between the two timestamps
wait_for_gap -- 从主库归档备库恢复归档
[nonlinear control theory]7_ High gain and High Frequency
From a professional background, I can't get into a small company for interview
Bluetooth technology | new working mode of wearable devices of the Internet of things, and Bluetooth ble helps the new working mode
应广单片机(MCU单片机科普)
毕业总结
The price is only 40 yuan. Pico development board of raspberry pie is added with WiFi module, and it is out of stock as soon as it comes into the market
我的创作纪念日
辉芒微IO单片机FT60F010A-URT
Simple understanding of cardinality sorting
Tips for self defined packaging of Yingguang SCM 003 burner
Easyai notes - machine learning
台湾飞凌FM8PB513B单片机提供单片机方案开发 产品设计
Easyai notes - deep learning