Hi,
Can you , please, explain the working of xLists in FreeRTOS?
Some drowings are highly appreciated.
I've tried to read the code but sincerely a pointer member of an xListItem, which is a member of a task's TCB, that points to this same TCB ... this gives me a headache !!
1- Suppose that portMAX_PRIORITIES = 3, an array pxReadyTasksLists[3] is created by the kernel.
pxReadyTasksLists[0] is a (pointer to a) list of all ready tasks with priority 0.
pxReadyTasksLists[1] is a (pointer to a) list of all ready tasks with priority 1.
... etc
- How pxReadyTasksLists[] is initialized before creating any tasks?
2- Now suppose there is only one task with priority 0 (idle task), 2 tasks with priority 1 and 3 tasks with priority 2.
- How the xListItem member of a newly created task is initialized?
- How the 3 lists are created (i.e how to insert a task in a list and how to sort the list) ?
3- How to search for the task with highest priority and how to remove it from the list?
Thanks