- FreeRTOS.org V4.6.0 - Copyright (C) 2003-2007 Richard Barry.\r
-\r
- This file is part of the FreeRTOS.org distribution.\r
-\r
- FreeRTOS.org is free software; you can redistribute it and/or modify\r
- it under the terms of the GNU General Public License as published by\r
- the Free Software Foundation; either version 2 of the License, or\r
- (at your option) any later version.\r
-\r
- FreeRTOS.org is distributed in the hope that it will be useful,\r
- but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- GNU General Public License for more details.\r
-\r
- You should have received a copy of the GNU General Public License\r
- along with FreeRTOS.org; if not, write to the Free Software\r
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
- A special exception to the GPL can be applied should you wish to distribute\r
- a combined work that includes FreeRTOS.org, without being obliged to provide\r
- the source code for any proprietary components. See the licensing section\r
- of http://www.FreeRTOS.org for full details of how and when the exception\r
- can be applied.\r
-\r
- ***************************************************************************\r
- See http://www.FreeRTOS.org for documentation, latest information, license\r
- and contact details. Please ensure to read the configuration and relevant\r
- port sections of the online documentation.\r
-\r
- Also see http://www.SafeRTOS.com for an IEC 61508 compliant version, along\r
- with development and support options.\r
- ***************************************************************************\r
-*/\r
-\r
-/*\r
-Changes from V1.00:\r
- \r
- + Call to portRESTORE_CONTEXT has been removed. The first context\r
- switch is now performed within sPortStartScheduler().\r
-\r
-Changes from V1.01:\r
-\r
- + More use of 8bit data types.\r
- + Function name prefixes changed where the data type returned has changed.\r
- + configUSE_TRACE_FACILITY is no longer defined by default.\r
-\r
-Changes from V1.2.0\r
-\r
- + Introduced ucTopReadyPriority. This tracks the highest priority ready\r
- queue that contains a valid TCB and thus makes the context switch\r
- slightly faster.\r
-\r
- + prvAddTaskToReadyQueue() has been made a macro.\r
-\r
-Changes from V1.2.6\r
-\r
- + Added conditional compilation directives.\r
- + Extended API.\r
- + Rearranged function order.\r
- + Creating a task now causes a context switch if the task being created\r
- has a higher priority than the calling task - assuming the kernel is\r
- running.\r
- + vTaskDelete() now only causes a context switch if the calling task is\r
- the task being deleted.\r
-\r
-Changes from V2.0.0\r
-\r
- + Allow the type of the tick count to be 16 or 32 bits.\r
- + Introduce xPendingReadyList feature to allow the time interrupts have to\r
- be disabled to be minimised.\r
- + Remove the #if( INCLUDE_vTaskSuspendAll ) statements. vTaskSuspendAll()\r
- is now always included as it is used by the scheduler itself.\r
-\r
-Changes from V2.1.0\r
-\r
- + Bug fix - pxCurrentTCB is now initialised before the call to\r
- prvInitializeTaskLists(). Previously pxCurrentTCB could be accessed\r
- while null.\r
-\r
-Changed from V2.1.1\r
-\r
- + Change to where lStackSize is declared within sTaskCreate() to prevent\r
- compiler warnings with 8051 port.\r
-\r
-Changes from V2.2.0\r
-\r
- + Explicit use of 'signed' qualifier on portCHAR types added.\r
- + Changed odd calculation of initial pxTopOfStack value when\r
- portSTACK_GROWTH < 0.\r
- + Removed pcVersionNumber definition.\r
-\r
-Changes from V2.5.3\r
-\r
- + cTaskResumeAll() modified to ensure it can be called prior to the task\r
- lists being initialised.\r
-\r
-Changes from V2.5.5\r
-\r
- + Added API function vTaskDelayUntil().\r
- + Added INCLUDE_vTaskDelay conditional compilation.\r
-\r
-Changes from V2.6.0\r
-\r
- + Updated the vWriteTraceToBuffer macro to always be 4 byte aligned so it\r
- can be used on ARM architectures.\r
- + tskMAX_TASK_NAME_LEN definition replaced with the port specific\r
- configMAX_TASK_NAME_LEN definition.\r
- + Removed the call to strcpy when copying across the task name into the\r
- TCB.\r
- + Added ucTasksDeleted variable to prevent vTaskSuspendAll() being called\r
- too often in the idle task.\r
-\r
-Changes between V3.0.0 and V2.6.1\r
-\r
- + When resuming the scheduler a yield is performed if either a tick has\r
- been missed, or a task is moved from the pending ready list into a ready\r
- list. Previously a yield was not performed on this second condition.\r
- + Introduced the type portBASE_TYPE. This necessitates several API\r
- changes.\r
- + Removed the sUsingPreemption variable. The constant defined in\r
- portmacro.h is now used directly.\r
- + The idle task can now include an optional hook function - and no longer\r
- completes its time slice if other tasks with equal priority to it are\r
- ready to run.\r
- + See the FreeRTOS.org documentation for more information on V2.x.x to\r
- V3.x.x modifications.\r
-\r
-Changes from V3.1.1\r
-\r
- + Modified vTaskPrioritySet() and vTaskResume() to allow these functions to\r
- be called while the scheduler is suspended.\r
- + Corrected the task ordering within event lists.\r
-\r
-Changes from V3.2.0\r
-\r
- + Added function xTaskGetCurrentTaskHandle().\r
-\r
-Changes from V3.2.4\r
-\r
- + Changed the volatile declarations on some variables to reflect the \r
- changes to the list definitions.\r
- + Changed the order of the TCB definition so there is commonality between\r
- the task control block and a co-routine control block.\r
- + Allow the scheduler to be started even if no tasks other than the idle\r
- task has been created. This allows co-routines to run even when no tasks\r
- have been created.\r
- + The need for a context switch is now signalled if a task woken by an \r
- event has a priority greater or equal to the currently running task.\r
- Previously this was only greater than.\r
-\r
-Changes from V4.0.0\r
-\r
- + Added the xMissedYield handling.\r
-\r
-Changes from V4.0.1\r
-\r
- + The function vTaskList() now suspends the scheduler rather than disabling\r
- interrupts during the creation of the task list. \r
- + Allow a task to delete itself by passing in its own handle. Previously \r
- this could only be done by passing in NULL.\r
- + The tick hook function is now called only within a tick isr. Previously\r
- it was also called when the tick function was called during the scheduler\r
- unlocking process.\r
-\r
-Changes from V4.0.3\r
-\r
- + Extra checks have been placed in vTaskPrioritySet() to avoid unnecessary\r
- yields.\r
-\r
-Changed from V4.0.4\r
-\r
- + Bug fix: The 'value' of the event list item is updated when the priority\r
- of a task is changed. Previously only the priority of the TCB itself was\r
- changed.\r
- + When resuming a task a check is first made to see if the task is actually\r
- suspended.\r
- + vTaskPrioritySet() and vTaskResume() no longer use the event list item.\r
- This has not been necessary since V4.0.1 when the xMissedYield handling\r
- was added.\r
- + Implement xTaskResumeFromISR().\r
-\r
-Changes from V4.0.5\r
-\r
- + Added utility functions and xOverflowCount variable to facilitate the\r
- queue.c changes.\r
-\r
-Changes from V4.1.2\r