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

📄 croutine.lst

📁 MSP430 IAR project with FreeRTOS port.
💻 LST
📖 第 1 页 / 共 3 页
字号:
   \                     vCoRoutineSchedule:
    271          {
    272          	/* See if any co-routines readied by events need moving to the ready lists. */
    273          	prvCheckPendingReadyList();
   \   000000   B012....     CALL    #prvCheckPendingReadyList
    274          
    275          	/* See if any delayed co-routines have timed out. */
    276          	prvCheckDelayedList();
   \   000004   B012....     CALL    #prvCheckDelayedList
    277          
    278          	/* Find the highest priority queue that contains ready co-routines. */
    279          	while( listLIST_IS_EMPTY( &( pxReadyCoRoutineLists[ uxTopCoRoutineReadyPriority ] ) ) )
   \                     ??vCoRoutineSchedule_0:
   \   000008   1F42....     MOV.W   &uxTopCoRoutineReadyPriority, R15
   \   00000C   0F5F         RLA.W   R15
   \   00000E   0E4F         MOV.W   R15, R14
   \   000010   0F5F         RLA.W   R15
   \   000012   0F5F         RLA.W   R15
   \   000014   0F5E         ADD.W   R14, R15
   \   000016   8F93....     CMP.W   #0x0, pxReadyCoRoutineLists(R15)
   \   00001A   0620         JNE     ??vCoRoutineSchedule_1
    280          	{
    281          		if( uxTopCoRoutineReadyPriority == 0 )
   \   00001C   8293....     CMP.W   #0x0, &uxTopCoRoutineReadyPriority
   \   000020   5224         JEQ     ??vCoRoutineSchedule_2
    282          		{
    283          			/* No more co-routines to check. */
    284          			return;
    285          		}
    286          		--uxTopCoRoutineReadyPriority;
   \   000022   B253....     ADD.W   #0xffff, &uxTopCoRoutineReadyPriority
   \   000026   F03F         JMP     ??vCoRoutineSchedule_0
    287          	}
    288          
    289          	/* listGET_OWNER_OF_NEXT_ENTRY walks through the list, so the co-routines
    290          	 of the	same priority get an equal share of the processor time. */
    291          	listGET_OWNER_OF_NEXT_ENTRY( pxCurrentCoRoutine, &( pxReadyCoRoutineLists[ uxTopCoRoutineReadyPriority ] ) );
   \                     ??vCoRoutineSchedule_1:
   \   000028   1F42....     MOV.W   &uxTopCoRoutineReadyPriority, R15
   \   00002C   0F5F         RLA.W   R15
   \   00002E   0E4F         MOV.W   R15, R14
   \   000030   0F5F         RLA.W   R15
   \   000032   0F5F         RLA.W   R15
   \   000034   0F5E         ADD.W   R14, R15
   \   000036   1F4F....     MOV.W   pxReadyCoRoutineLists + 2(R15), R15
   \   00003A   1E42....     MOV.W   &uxTopCoRoutineReadyPriority, R14
   \   00003E   0E5E         RLA.W   R14
   \   000040   0D4E         MOV.W   R14, R13
   \   000042   0E5E         RLA.W   R14
   \   000044   0E5E         RLA.W   R14
   \   000046   0E5D         ADD.W   R13, R14
   \   000048   9E4F0200.... MOV.W   0x2(R15), pxReadyCoRoutineLists + 2(R14)
   \   00004E   1F42....     MOV.W   &uxTopCoRoutineReadyPriority, R15
   \   000052   0F5F         RLA.W   R15
   \   000054   0E4F         MOV.W   R15, R14
   \   000056   0F5F         RLA.W   R15
   \   000058   0F5F         RLA.W   R15
   \   00005A   0F5E         ADD.W   R14, R15
   \   00005C   3E40....     MOV.W   #pxReadyCoRoutineLists + 4, R14
   \   000060   1D42....     MOV.W   &uxTopCoRoutineReadyPriority, R13
   \   000064   0D5D         RLA.W   R13
   \   000066   0C4D         MOV.W   R13, R12
   \   000068   0D5D         RLA.W   R13
   \   00006A   0D5D         RLA.W   R13
   \   00006C   0D5C         ADD.W   R12, R13
   \   00006E   0E5D         ADD.W   R13, R14
   \   000070   8F9E....     CMP.W   R14, pxReadyCoRoutineLists + 2(R15)
   \   000074   1320         JNE     ??vCoRoutineSchedule_3
   \   000076   1F42....     MOV.W   &uxTopCoRoutineReadyPriority, R15
   \   00007A   0F5F         RLA.W   R15
   \   00007C   0E4F         MOV.W   R15, R14
   \   00007E   0F5F         RLA.W   R15
   \   000080   0F5F         RLA.W   R15
   \   000082   0F5E         ADD.W   R14, R15
   \   000084   1F4F....     MOV.W   pxReadyCoRoutineLists + 2(R15), R15
   \   000088   1E42....     MOV.W   &uxTopCoRoutineReadyPriority, R14
   \   00008C   0E5E         RLA.W   R14
   \   00008E   0D4E         MOV.W   R14, R13
   \   000090   0E5E         RLA.W   R14
   \   000092   0E5E         RLA.W   R14
   \   000094   0E5D         ADD.W   R13, R14
   \   000096   9E4F0200.... MOV.W   0x2(R15), pxReadyCoRoutineLists + 2(R14)
   \                     ??vCoRoutineSchedule_3:
   \   00009C   1F42....     MOV.W   &uxTopCoRoutineReadyPriority, R15
   \   0000A0   0F5F         RLA.W   R15
   \   0000A2   0E4F         MOV.W   R15, R14
   \   0000A4   0F5F         RLA.W   R15
   \   0000A6   0F5F         RLA.W   R15
   \   0000A8   0F5E         ADD.W   R14, R15
   \   0000AA   1F4F....     MOV.W   pxReadyCoRoutineLists + 2(R15), R15
   \   0000AE   924F0600.... MOV.W   0x6(R15), &pxCurrentCoRoutine
    292          
    293          	/* Call the co-routine. */
    294          	( pxCurrentCoRoutine->pxCoRoutineFunction )( pxCurrentCoRoutine, pxCurrentCoRoutine->uxIndex );
   \   0000B4   1F42....     MOV.W   &pxCurrentCoRoutine, R15
   \   0000B8   1E4F1800     MOV.W   0x18(R15), R14
   \   0000BC   1C42....     MOV.W   &pxCurrentCoRoutine, R12
   \   0000C0   1F42....     MOV.W   &pxCurrentCoRoutine, R15
   \   0000C4   AF12         CALL    @R15
    295          
    296          	return;
   \                     ??vCoRoutineSchedule_2:
   \   0000C6   3041         RET
    297          }
    298          /*-----------------------------------------------------------*/
    299          

   \                                 In segment CODE, align 2
    300          static void prvInitialiseCoRoutineLists( void )
   \                     prvInitialiseCoRoutineLists:
    301          {
   \   000000   0A12         PUSH.W  R10
    302          unsigned portBASE_TYPE uxPriority;
    303          
    304          	for( uxPriority = 0; uxPriority < configMAX_CO_ROUTINE_PRIORITIES; uxPriority++ )
   \   000002   0A43         MOV.W   #0x0, R10
   \                     ??prvInitialiseCoRoutineLists_0:
   \   000004   2A93         CMP.W   #0x2, R10
   \   000006   0D2C         JC      ??prvInitialiseCoRoutineLists_1
    305          	{
    306          		vListInitialise( ( xList * ) &( pxReadyCoRoutineLists[ uxPriority ] ) );
   \   000008   3C40....     MOV.W   #pxReadyCoRoutineLists, R12
   \   00000C   0F4A         MOV.W   R10, R15
   \   00000E   0F5F         RLA.W   R15
   \   000010   0E4F         MOV.W   R15, R14
   \   000012   0F5F         RLA.W   R15
   \   000014   0F5F         RLA.W   R15
   \   000016   0F5E         ADD.W   R14, R15
   \   000018   0C5F         ADD.W   R15, R12
   \   00001A   B012....     CALL    #vListInitialise
    307          	}
   \   00001E   1A53         ADD.W   #0x1, R10
   \   000020   F13F         JMP     ??prvInitialiseCoRoutineLists_0
    308          
    309          	vListInitialise( ( xList * ) &xDelayedCoRoutineList1 );
   \                     ??prvInitialiseCoRoutineLists_1:
   \   000022   3C40....     MOV.W   #xDelayedCoRoutineList1, R12
   \   000026   B012....     CALL    #vListInitialise
    310          	vListInitialise( ( xList * ) &xDelayedCoRoutineList2 );
   \   00002A   3C40....     MOV.W   #xDelayedCoRoutineList2, R12
   \   00002E   B012....     CALL    #vListInitialise
    311          	vListInitialise( ( xList * ) &xPendingReadyList );
   \   000032   3C40....     MOV.W   #xPendingReadyList, R12
   \   000036   B012....     CALL    #vListInitialise
    312          
    313          	/* Start with pxDelayedCoRoutineList using list1 and the 
    314          	pxOverflowDelayedCoRoutineList using list2. */
    315          	pxDelayedCoRoutineList = &xDelayedCoRoutineList1;
   \   00003A   B240........ MOV.W   #xDelayedCoRoutineList1, &pxDelayedCoRoutineList
    316          	pxOverflowDelayedCoRoutineList = &xDelayedCoRoutineList2;
   \   000040   B240........ MOV.W   #xDelayedCoRoutineList2, &pxOverflowDelayedCoRoutineList
    317          }
   \   000046   3A41         POP.W   R10
   \   000048   3041         RET
    318          /*-----------------------------------------------------------*/
    319          

   \                                 In segment CODE, align 2
    320          portBASE_TYPE xCoRoutineRemoveFromEventList( const xList *pxEventList )
   \                     xCoRoutineRemoveFromEventList:
    321          {
   \   000000   0A12         PUSH.W  R10
   \   000002   0B12         PUSH.W  R11
   \   000004   0812         PUSH.W  R8
   \   000006   0A4C         MOV.W   R12, R10
    322          corCRCB *pxUnblockedCRCB;
    323          portBASE_TYPE xReturn;
    324          
    325          	/* This function is called from within an interrupt.  It can only access
    326          	event lists and the pending ready list. */
    327          	pxUnblockedCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxEventList );
   \   000008   8A930000     CMP.W   #0x0, 0(R10)
   \   00000C   0524         JEQ     ??xCoRoutineRemoveFromEventList_0
   \   00000E   1F4A0600     MOV.W   0x6(R10), R15
   \   000012   1B4F0600     MOV.W   0x6(R15), R11
   \   000016   013C         JMP     ??xCoRoutineRemoveFromEventList_1
   \                     ??xCoRoutineRemoveFromEventList_0:
   \   000018   0B43         MOV.W   #0x0, R11
    328          	vListRemove( &( pxUnblockedCRCB->xEventListItem ) );
   \                     ??xCoRoutineRemoveFromEventList_1:
   \   00001A   0C4B         MOV.W   R11, R12
   \   00001C   3C500C00     ADD.W   #0xc, R12
   \   000020   B012....     CALL    #vListRemove
    329          	vListInsertEnd( ( xList * ) &( xPendingReadyList ), &( pxUnblockedCRCB->xEventListItem ) );
   \   000024   0E4B         MOV.W   R11, R14
   \   000026   3E500C00     ADD.W   #0xc, R14
   \   00002A   3C40....     MOV.W   #xPendingReadyList, R12
   \   00002E   B012....     CALL    #vListInsertEnd
    330          
    331          	if( pxUnblockedCRCB->uxPriority >= pxCurrentCoRoutine->uxPriority )
   \   000032   1F42....     MOV.W   &pxCurrentCoRoutine, R15
   \   000036   9B9F16001600 CMP.W   0x16(R15), 0x16(R11)
   \   00003C   0228         JNC     ??xCoRoutineRemoveFromEventList_2
    332          	{
    333          		xReturn = pdTRUE;
   \   00003E   1843         MOV.W   #0x1, R8
   \   000040   013C         JMP     ??xCoRoutineRemoveFromEventList_3
    334          	}
    335          	else
    336          	{
    337          		xReturn = pdFALSE;
   \                     ??xCoRoutineRemoveFromEventList_2:
   \   000042   0843         MOV.W   #0x0, R8
    338          	}
    339          
    340          	return xReturn;
   \                     ??xCoRoutineRemoveFromEventList_3:
   \   000044   0C48         MOV.W   R8, R12
   \   000046   3040....     BR      #?Epilogue3
    341          }
    342          

   Maximum stack usage in bytes:

     Function                       CSTACK
     --------                       ------
     prvCheckDelayedList                4
       -> xTaskGetTickCount             4
       -> vListRemove                   4
       -> vListRemove                   4
       -> vListInsertEnd                4
     prvCheckPendingReadyList           4
       -> vListRemove                   4
       -> vListRemove                   4
       -> vListInsertEnd                4
     prvInitialiseCoRoutineLists        4
       -> vListInitialise               4
       -> vListInitialise               4
       -> vListInitialise               4
       -> vListInitialise               4
     vCoRoutineAddToDelayedList         8
       -> vListRemove                   8
       -> vListInsert                   8
       -> vListInsert                   8
       -> vListInsert                   8
     vCoRoutineSchedule                 2
       -> prvCheckPendingReadyList      2
       -> prvCheckDelayedList           2
       ->   Indirect call               2
     xCoRoutineCreate                  12
       -> pvPortMalloc                 12
       -> prvInitialiseCoRoutineLists
                                       12
       -> vListInitialiseItem          12
       -> vListInitialiseItem          12
       -> vListInsertEnd               12
     xCoRoutineRemoveFromEventList      8
       -> vListRemove                   8
       -> vListInsertEnd                8


   Segment part sizes:

     Function/Label                 Bytes
     --------------                 -----
     pxReadyCoRoutineLists            20
     xDelayedCoRoutineList1           10
     xDelayedCoRoutineList2           10
     pxDelayedCoRoutineList            2
     pxOverflowDelayedCoRoutineList    2
     xPendingReadyList                10
     pxCurrentCoRoutine                2
     uxTopCoRoutineReadyPriority       2
     xCoRoutineTickCount               2
     xCoRoutineCreate                156
     vCoRoutineAddToDelayedList       94
     prvCheckPendingReadyList         98
     prvCheckDelayedList             170
     xLastTickCount                    2
     xPassedTicks                      2
     vCoRoutineSchedule              200
     prvInitialiseCoRoutineLists      74
     xCoRoutineRemoveFromEventList    74

 
 866 bytes in segment CODE
  64 bytes in segment DATA16_Z
 
 866 bytes of CODE memory
  64 bytes of DATA memory

Errors: none
Warnings: none

⌨️ 快捷键说明

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