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] [October 2007 Threads] Differences between v4.5.0 TCB and v4.4.0Posted by John W. on October 9, 2007 Richard,
I looked at http://www.freertos.org/History.txt but didn't see any mention of the TCB changes from v4.4.0 to v4.5.0 - can you please elaborate on the changes:
v4.4.0:
/* * Task control block. A task control block (TCB) is allocated to each task, * and stores the context of the task. */ typedef struct tskTaskControlBlock { volatile portSTACK_TYPE*pxTopOfStack;/*< Points to the location of the last item placed on the tasks stack. THIS MUST BE THE FIRST MEMBER OF THE STRUCT. */ unsigned portBASE_TYPEuxTCBNumber;/*< This is used for tracing the scheduler and making debugging easier only. */ xListItemxGenericListItem;/*< List item used to place the TCB in ready and blocked queues. */ xListItemxEventListItem;/*< List item used to place the TCB in event lists. */ unsigned portBASE_TYPEuxPriority;/*< The priority of the task where 0 is the lowest priority. */ portSTACK_TYPE*pxStack;/*< Points to the start of the stack. */ signed portCHARpcTaskName[ configMAX_TASK_NAME_LEN ];/*< Descriptive name given to the task when created. Facilitates debugging only. */ unsigned portSHORTusStackDepth;/*< Total depth of the stack (when empty). This is defined as the number of variables the stack can hold, not the number of bytes. */ } tskTCB;
/*lint -e956 */
tskTCB * volatile data pxCurrentTCB = NULL;
v4.5.0:
/* * Task control block. A task control block (TCB) is allocated to each task, * and stores the context of the task. */ typedef struct tskTaskControlBlock { volatile portSTACK_TYPE*pxTopOfStack;/*< Points to the location of the last item placed on the tasks stack. THIS MUST BE THE FIRST MEMBER OF THE STRUCT. */ xListItemxGenericListItem;/*< List item used to place the TCB in ready and blocked queues. */ xListItemxEventListItem;/*< List item used to place the TCB in event lists. */ unsigned portBASE_TYPEuxPriority;/*< The priority of the task where 0 is the lowest priority. */ portSTACK_TYPE*pxStack;/*< Points to the start of the stack. */ signed portCHARpcTaskName[ configMAX_TASK_NAME_LEN ];/*< Descriptive name given to the task when created. Facilitates debugging only. */
#if ( configUSE_TRACE_FACILITY == 1 ) unsigned portBASE_TYPEuxTCBNumber;/*< This is used for tracing the scheduler and making debugging easier only. */ #endif
#if ( configUSE_MUTEXES == 1 ) unsigned portBASE_TYPE uxBasePriority; #endif
} tskTCB;
/*lint -e956 */
tskTCB * volatile pxCurrentTCB = NULL;
Thanks, John W.
RE: Differences between v4.5.0 TCB and v4.4.0Posted by Richard on October 9, 2007 There were only a couple of minor changes.
The uxBasePriority member was introduced for the priority inheritance mechanism. This is only used if mutexes are compiled in.
Adding this member could potentially increase the size of the TCB, depending on the configuration, so I optionally allowed another member to be excluded to lessen the impact. The uxTCBNumber member has no use other than debugging/tracing, so I excluded this is the trace facility was not compiled in.
Regards.
RE: Differences between v4.5.0 TCB and v4.4.0Posted by John W. on October 9, 2007 Richard,
What about usStackDepth - can you explain why that was removed.
Also - can you point to the files for the following:
+ Optimised the GCC and IAR port layer code - specifically the context switch code.
I'd like to take a look at the part that detects whether a context switch is needed or not - maybe that is part of this optimization.
Thanks, John
RE: Differences between v4.5.0 TCB and v4.4.0Posted by Richard on October 9, 2007 >What about usStackDepth - can you explain why that was removed
This was obsolete. It was only used in one place, and at that location the depth was available as a function parameter, so it was not needed.
>+ Optimised the GCC and IAR port layer code - specifically the context >switch code.
That comment is missing some vital information. It should say "Optimised the GCC and IAR port layer code for the Cortex M3 ports". The change does not effect any other ports as it is within the M3 specific assembly code.
Regards.
RE: Differences between v4.5.0 TCB and v4.4.0Posted by John W. on October 10, 2007 Richard,
Thanks - I'm going to take a look at the M3 assembly since I'm curious as to what you have done.
Thanks Again, John
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|