FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2017 Threads]
Hi,
I was going into FreeRTOS kernel code and i found few things confusing.
** FreeRTOS version: 9.0.0**
port: coretx-M4F RVDS
My queries are:
- In tasks.c at Line # 375, we have few lists definitions like:
~~~
Listt pxReadyTasksLists [configMAXPRIORITIES]
~~~
List_t consistis of:
a. ListItemt
b. MiniListItemt xListEnd
If MiniListItem_t member of List_t is used to inidicate the end of List than why we need every array item to contain MiniListItem_t. i.e. pxReadyTasksLists is an array and each linkedlist element (Listt) of this array should contain both **ListItemt** and MiniListItem_t. Why we need MiniListItem_t in every element of every list? Why not just add it at the end of pxReadyTasksLists and take it out of List_t struct.
................................................................................................................................................................
2. In file tasks.c function prvInitialiseNewTask the string from string pool is copied to TCB_t character by character. Line # 834.
~~~
if (pcName[x] == 0x00) {
break;
}
~~~
This statment is intended to check the end of string. My question is how can we check the end of string pool with pcName[x] == 0x00?? shouldn't it be like: pcName[x] == '0'?
- In tasks.c at Line # 375, we have few lists definitions like:
Listt pxReadyTasksLists [configMAXPRIORITIES]
List_t consistis of:
a. ListItemt
b. MiniListItemt xListEnd
If MiniListItem_t member of List_t is used to inidicate the end of
List than why we need every array item to contain MiniListItem_t. i.e.
pxReadyTasksLists is an array and each linkedlist element (Listt) of
this array should contain both *ListItemt* and MiniListItem_t. Why we
need MiniListItem_t in every element of every list? Why not just add
it at the end of pxReadyTasksLists and take it out of List_t struct.
This is an array of linked lists. Each index in the array has its own
unique linked list, and each unique linked list has its own end marker.
For example, if you were to access the linked list at array
position/index 1 then you want to know where the end of that list is,
not the where the end of the list in the first or last position in the
array is.
................................................................................................................................................................
2. In file tasks.c function prvInitialiseNewTask the string from
string pool is copied to TCB_t character by character. Line # 834.
if (pcName[x] == 0x00) {
break;
}
This statment is intended to check the end of string. My question is how
can we check the end of string pool with pcName[x] == 0x00?? shouldn't
it be like: pcName[x] == '0'?
0 and 00 (and NULL) are all equivalent to each other - any could be used.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.