⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tasks.lst

📁 本代码已经经过修改
💻 LST
📖 第 1 页 / 共 5 页
字号:
##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.30A/W32 KICKSTART     14/Dec/2005  14:41:49 #
# Copyright 1999-2005 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Cpu mode        =  interwork                                            #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Source\tasks.c      #
#    Command line    =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Source\tasks.c -D   #
#                       _NDEBUG -D STR71X_IAR -lC                            #
#                       D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\binary\List\ --diag_suppress pe191,pa082 -o        #
#                       D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\binary\Obj\ -s9 --no_clustering --cpu_mode thumb   #
#                       --endian little --cpu ARM7TDMI --stack_align 4       #
#                       --interwork -e --require_prototypes --fpu None       #
#                       --dlib_config "C:\Program Files\IAR                  #
#                       Systems\Embedded Workbench 4.0                       #
#                       Kickstart\arm\LIB\dl4tptinl8n.h" -I                  #
#                       D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\ -I D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR #
#                       71x_IAR\library\include\ -I                          #
#                       D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\..\common\include\ -I D:\board\FreeRTOSV3.2.3\Free #
#                       RTOS\Demo\ARM7_STR71x_IAR\..\..\source\include\ -I   #
#                       "C:\Program Files\IAR Systems\Embedded Workbench     #
#                       4.0 Kickstart\arm\INC\"                              #
#    List file       =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\binary\List\tasks.lst                              #
#    Object file     =  D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
#                       R\binary\Obj\tasks.r79                               #
#                                                                            #
#                                                                            #
##############################################################################

D:\board\FreeRTOSV3.2.3\FreeRTOS\Source\tasks.c
      1          /*
      2          	FreeRTOS V3.2.3 - Copyright (C) 2003-2005 Richard Barry.
      3          
      4          	This file is part of the FreeRTOS distribution.
      5          
      6          	FreeRTOS is free software; you can redistribute it and/or modify
      7          	it under the terms of the GNU General Public License as published by
      8          	the Free Software Foundation; either version 2 of the License, or
      9          	(at your option) any later version.
     10          
     11          	FreeRTOS is distributed in the hope that it will be useful,
     12          	but WITHOUT ANY WARRANTY; without even the implied warranty of
     13          	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14          	GNU General Public License for more details.
     15          
     16          	You should have received a copy of the GNU General Public License
     17          	along with FreeRTOS; if not, write to the Free Software
     18          	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     19          
     20          	A special exception to the GPL can be applied should you wish to distribute
     21          	a combined work that includes FreeRTOS, without being obliged to provide
     22          	the source code for any proprietary components.  See the licensing section
     23          	of http://www.FreeRTOS.org for full details of how and when the exception
     24          	can be applied.
     25          
     26          	***************************************************************************
     27          	See http://www.FreeRTOS.org for documentation, latest information, license
     28          	and contact details.  Please ensure to read the configuration and relevant
     29          	port sections of the online documentation.
     30          	***************************************************************************
     31          */
     32          
     33          /*
     34          Changes from V1.00:
     35          	
     36          	+ Call to portRESTORE_CONTEXT has been removed.  The first context
     37          	  switch is now performed within sPortStartScheduler().
     38          
     39          Changes from V1.01:
     40          
     41          	+ More use of 8bit data types.
     42          	+ Function name prefixes changed where the data type returned has changed.
     43          	+ configUSE_TRACE_FACILITY is no longer defined by default.
     44          
     45          Changes from V1.2.0
     46          
     47          	+ Introduced ucTopReadyPriority.  This tracks the highest priority ready
     48          	  queue that contains a valid TCB and thus makes the context switch
     49          	  slightly faster.
     50          
     51          	+ prvAddTaskToReadyQueue() has been made a macro.
     52          
     53          Changes from V1.2.6
     54          
     55          	+ Added conditional compilation directives.
     56          	+ Extended API.
     57          	+ Rearranged function order.
     58          	+ Creating a task now causes a context switch if the task being created
     59          	  has a higher priority than the calling task - assuming the kernel is
     60          	  running.
     61          	+ vTaskDelete() now only causes a context switch if the calling task is
     62          	  the task being deleted.
     63          
     64          Changes from V2.0.0
     65          
     66          	+ Allow the type of the tick count to be 16 or 32 bits.
     67          	+ Introduce xPendingReadyList feature to allow the time interrupts have to
     68          	  be disabled to be minimised.
     69          	+ Remove the #if( INCLUDE_vTaskSuspendAll ) statements.  vTaskSuspendAll()
     70          	  is now always included as it is used by the scheduler itself.
     71          
     72          Changes from V2.1.0
     73          
     74          	+ Bug fix - pxCurrentTCB is now initialised before the call to
     75          	  prvInitialiseTaskLists().  Previously pxCurrentTCB could be accessed
     76          	  while null.
     77          
     78          Changed from V2.1.1
     79          
     80          	+ Change to where lStackSize is declared within sTaskCreate() to prevent
     81          	  compiler warnings with 8051 port.
     82          
     83          Changes from V2.2.0
     84          
     85          	+ Explicit use of 'signed' qualifier on portCHAR types added.
     86          	+ Changed odd calculation of initial pxTopOfStack value when
     87          	  portSTACK_GROWTH < 0.
     88          	+ Removed pcVersionNumber definition.
     89          
     90          Changes from V2.5.3
     91          
     92          	+ cTaskResumeAll() modified to ensure it can be called prior to the task
     93          	  lists being initialised.
     94          
     95          Changes from V2.5.5
     96          
     97          	+ Added API function vTaskDelayUntil().
     98          	+ Added INCLUDE_vTaskDelay conditional compilation.
     99          
    100          Changes from V2.6.0
    101          
    102           	+ Updated the vWriteTraceToBuffer macro to always be 4 byte aligned so it
    103          	  can be used on ARM architectures.
    104          	+ tskMAX_TASK_NAME_LEN definition replaced with the port specific
    105          	  configMAX_TASK_NAME_LEN definition.
    106          	+ Removed the call to strcpy when copying across the task name into the
    107          	  TCB.
    108          	+ Added ucTasksDeleted variable to prevent vTaskSuspendAll() being called
    109          	  too often in the idle task.
    110          
    111          Changes between V3.0.0 and V2.6.1
    112          
    113          	+ When resuming the scheduler a yield is performed if either a tick has
    114          	  been missed, or a task is moved from the pending ready list into a ready
    115          	  list.  Previously a yield was not performed on this second condition.
    116          	+ Introduced the type portBASE_TYPE.  This necessitates several API
    117          	  changes.
    118          	+ Removed the sUsingPreemption variable.  The constant defined in
    119          	  portmacro.h is now used directly.
    120          	+ The idle task can now include an optional hook function - and no longer
    121          	  completes its time slice if other tasks with equal priority to it are
    122          	  ready to run.
    123          	+ See the FreeRTOS.org documentation for more information on V2.x.x to
    124          	  V3.x.x modifications.
    125          
    126          Changes from V3.1.1
    127          
    128          	+ Modified vTaskPrioritySet() and vTaskResume() to allow these functions to
    129          	  be called while the scheduler is suspended.
    130          	+ Corrected the task ordering within event lists.
    131          
    132          Changes from V3.2.0
    133          
    134          	+ Added function xTaskGetCurrentTaskHandle().
    135          */
    136          
    137          #include <stdio.h>
    138          #include <stdlib.h>
    139          #include <string.h>
    140          
    141          #include "FreeRTOS.h"
    142          #include "task.h"
    143          
    144          /*
    145           * Macro to define the amount of stack available to the idle task.
    146           */
    147          #define tskIDLE_STACK_SIZE	configMINIMAL_STACK_SIZE
    148          
    149          
    150          /*
    151           * Default a definitions for backwards compatibility with old
    152           * portmacro.h files.
    153           */
    154          #ifndef configMAX_TASK_NAME_LEN
    155          	#define configMAX_TASK_NAME_LEN 16
    156          #endif
    157          
    158          #ifndef INCLUDE_xTaskGetCurrentTaskHandle
    159          	#define INCLUDE_xTaskGetCurrentTaskHandle 0
    160          #endif
    161          
    162          #ifndef configIDLE_SHOULD_YIELD
    163          	#define configIDLE_SHOULD_YIELD		1
    164          #endif
    165          
    166          #if configMAX_TASK_NAME_LEN < 1
    167          	#undef configMAX_TASK_NAME_LEN
    168          	#define configMAX_TASK_NAME_LEN 1
    169          #endif
    170          
    171          
    172          /*
    173           * Task control block.  A task control block (TCB) is allocated to each task,
    174           * and stores the context of the task.
    175           */
    176          typedef struct tskTaskControlBlock
    177          {
    178          	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. */
    179          	portSTACK_TYPE			*pxStack;			/*< Points to the start of the stack. */
    180          	unsigned portBASE_TYPE	uxTCBNumber;		/*< This is used for tracing the scheduler and making debugging easier only. */
    181          	unsigned portBASE_TYPE	uxPriority;			/*< The priority of the task where 0 is the lowest priority. */
    182          	xListItem				xGenericListItem;	/*< List item used to place the TCB in ready and blocked queues. */
    183          	xListItem				xEventListItem;		/*< List item used to place the TCB in event lists. */
    184          	signed portCHAR			pcTaskName[ configMAX_TASK_NAME_LEN ];/*< Descriptive name given to the task when created.  Facilitates debugging only. */
    185          	unsigned portSHORT		usStackDepth;		/*< Total depth of the stack (when empty).  This is defined as the number of variables the stack can hold, not the number of bytes. */
    186          } tskTCB;
    187          
    188          /*lint -e956 */
    189          

   \                                 In segment DATA_Z, align 4, align-sorted
    190          volatile tskTCB * volatile pxCurrentTCB = NULL;					
   \                     pxCurrentTCB:
   \   00000000                      DS8 4
    191          
    192          /* Lists for ready and blocked tasks. --------------------*/
    193          

   \                                 In segment DATA_Z, align 4, align-sorted

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -