freeRTOS learning two

Critical sections, one sentence is for a code segment in the implementation can not be interrupted.

Situation critical section is interrupted, a system is scheduled, and the other is external interrupt.

Protection of critical section is interrupted on and off.


Idle task delay and obstruction

 

 xTicksToDelay is a member of the task control block for recording tasks required delay time, the unit is SysTick interrupt cycle.


 Multiple Priority

FreeRTOS, the smaller the priority number, the smaller the priority logic.

The lowest priority of the idle task is 0. Idle task has been in a ready state.

Ready list is an array inside the store is ready xStateListItem node tasks in the TCB.

When you create a task, according to the priority task of the task into the ready list to a different location. The same priority will be inserted into the same list ready list.


 Delay Task List

When the task requires a delay, the first task pending, namely first task is removed from the ready list, and then insert a delay task list, while updating the variable time to unlock the next task xNextTaskUnblockTime value, when xNextTaskUnblockTime = xTickCount (system counter-yl) + xTicksToDelay.


 

Dynamically created task

 

Guess you like

Origin www.cnblogs.com/ustc-anmin/p/11366034.html