当前位置:网站首页>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 .
边栏推荐
猜你喜欢

C语言数组专题训练

Ros2 - Service Service (IX)

扫盲-以太网MII接口类型大全-MII、RMII、SMII、GMII、RGMII、SGMII、XGMII、XAUI、RXAUI

三体目标管理笔记

Dameng database all

SOC_SD_CMD_FSM

Vant Weapp SwipeCell設置多個按鈕

Literacy Ethernet MII interface types Daquan MII, RMII, smii, gmii, rgmii, sgmii, XGMII, XAUI, rxaui

SD_CMD_SEND_SHIFT_REGISTER

Rehabilitation type force deduction brush question notes D1
随机推荐
扫盲-以太网MII接口类型大全-MII、RMII、SMII、GMII、RGMII、SGMII、XGMII、XAUI、RXAUI
ROS2——配置开发环境(五)
Unity 之 ExecuteAlways正在取代ExecuteInEditMode
使用paping工具进行tcp端口连通性检测
inux摄像头(mipi接口)简要说明
Utf8 encoding
Written examination notes
Marvell 88e1515 PHY loopback mode test
【无标题】
Preemption of CFS scheduling
What is linting
PHY驱动调试之 --- MDIO/MDC接口22号和45号条款(一)
.net core踩坑实践
Vscode editor
网易To B,柔外刚中
全局变量和静态变量的初始化
The difference between new and malloc
Executealways of unity is replacing executeineditmode
Ros2 - ros2 vs. ros1 (II)
NVM Downloading npm version 6.7.0... Error