当前位置:网站首页>1281_ FreeRTOS_ Implementation analysis of vtaskdelayuntil
1281_ FreeRTOS_ Implementation analysis of vtaskdelayuntil
2022-06-25 23:02:00 【grey_ csdn】
All learning summary : GreyZhang/g_FreeRTOS: learning notes about FreeRTOS. (github.com)
I have made a brief analysis of vTaskDelay(), Analyze this time vTaskDelayUntil() The implementation of the . Before , I vaguely remember when I read the document vTaskDelayUntil() The delay that can be completed is more accurate . This time, , From a code design perspective, see why .
there pxPreviousWakeTime The implemented function is also a parameter passing function , What is passed in is a time benchmark . Of course , It is itself a pointer , What is passed in is not a numeric parameter . here , The key message is :1, The scheduler cannot suspend ; 2, Wake up time timing setting . it seems , The routine is the same as that analyzed before vTaskDelay() There is not much difference .
here , Distinguished tick If the timeout . In each case , Whether the delay time has reached . If you reach , Then you can directly request task scheduling .
Actually , The processing of this part is the same as that of the previous analysis vTaskDelay() The processing interface of is also very similar . Actually , The main way is to join delayed task The task scheduling request is triggered after the linked list .
that , What are the differences between the two interfaces ? Why do you say vTaskDelay() Not as good as vTaskDelayUntil() How about precision ? Actually , After reading the code, I can basically understand the difference between the two . If you understand the difference between the two , In fact, some clues can be seen from the interface form of the function . In fact, the delay implementation of the two interfaces is a continuous judgment after the timer sets a reference value , But the setting of this reference point is different .vTaskDelay() The set reference point always starts from the current , and vTaskDelayUntil() The setting of reference point can be specified .
This is a code example used , Actually , I think the functions of this example are similar to vTaskDelay() The functions implemented by the interface are not too different . Especially when When some high priority tasks are preempted . that , If there is a certain difference between the two interface implementations ? That must be the time when the reference point settings are constantly updated , There may be more flexible ways .
This is an analysis of the examples and an added comparison . Actually , Whether it's vTaskDelayUntil() still vTaskDelay(), If you continue to encounter long running and high priority tasks , Their accuracy will certainly be affected . After all, so far , I don't see any improvement in the priority of such tasks . From this point of view , The differences previously considered , Actually 2 Both interfaces are affected . After excluding such differences , The difference between the two interfaces can be understood as :vTaskDelay() The setting is actually time waiting , and vTaskDelayUntil() The implementation is to frame a time window .
边栏推荐
- 腾讯《和平精英》新版本将至:新增账号安全保护系统,游戏内违规行为检测升级
- ES6-Const常量与数组解构
- .sql数据库导入错误:/*!40101 SET @[email protected]@COLLATION_CONNECTION */
- [eosio] eos/wax signature error is_ Canonical (c): signature is not canonical
- What are the channels for Internet advertising to gain customers?
- 面对AI人才培养的“产学研”鸿沟,昇腾AI如何做厚产业人才黑土地?
- 2、一个向量乘它的转置,其几何意义是什么?
- How to use the find command
- What should it personnel over 35 years old do if they are laid off by the company one day?
- ES6-- 模板字符串、对象的简化写法、箭头函数
猜你喜欢
Unity的Ping类使用
Glory launched the points mall to support the exchange of various glory products
oracle -- 表操作
This 110 year old "longevity" enterprise has been planning for the next century
Tiger Dao VC products are officially launched, a powerful supplement to seektiger ecology
字符串变形(字符串大小写切换和变现)
Zhihu Gaozan: what ability is important, but most people don't have it?
2022-2028 global vacuum jacket system industry survey and trend analysis report
Interview shock 23: talk about thread life cycle and transformation process?
The Ping class of unity uses
随机推荐
Flutter 网络请求封装之Dio(Cookie管理、添加拦截器、下载文件、异常处理、取消请求等)
记|一次exists关键字的学习记录
使用EAST ocr遇到的坑解决方法(编译lanms)
Dio encapsulé pour les requêtes réseau flutter (gestion des cookies, ajout d'intercepteurs, téléchargement de fichiers, gestion des exceptions, annulation des requêtes, etc.)
Relinearization in homomorphic encryption (ckks)
Flutter 網絡請求封裝之Dio(Cookie管理、添加攔截器、下載文件、异常處理、取消請求等)
Huawei cloud SMS has tested that many mobile phones prompt frequent sending
Why can't the mobile phone be used and the computer be connected
ADB common commands
2022-2028 global industrial touch screen industry research and trend analysis report
2022-2028 global vacuum jacket system industry survey and trend analysis report
Lecture 14 of the Blue Bridge Cup -- number theory [example]
22 years of a doctor in Huawei
ES6-- 集合
一位博士在华为的22年
Mysql database index
Fastjson deserialization randomness failed
MATLAB Programming Notes
【EOSIO】EOS/WAX签名错误 is_canonical( c ): signature is not canonical 问题
Intimacy - [comfortable exit] - final communication to reduce injury