]> git.sur5r.net Git - freertos/commitdiff
Core kernel code changes:
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 14 Feb 2016 11:58:11 +0000 (11:58 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 14 Feb 2016 11:58:11 +0000 (11:58 +0000)
+ Added xTaskAbortDelay() function, which causes a task to exit the Blocked state even before the timeout has expired or the event the task is waiting for has occurred.
+ For efficiency and code size reasons on some architectures, replace many instances of "== pdTRUE" with "!= pdFALSE".

git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2416 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Source/include/task.h
FreeRTOS/Source/portable/MemMang/ReadMe.url [new file with mode: 0644]
FreeRTOS/Source/portable/readme.txt
FreeRTOS/Source/queue.c
FreeRTOS/Source/tasks.c
FreeRTOS/Source/timers.c

index 182d359125c12e5b52f6f9e44a1b41f4bb082786..df352eb95eee08ae481d4abe4babc7b63f2342c9 100644 (file)
@@ -744,6 +744,31 @@ void vTaskDelay( const TickType_t xTicksToDelay ) PRIVILEGED_FUNCTION;
  */\r
 void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) PRIVILEGED_FUNCTION;\r
 \r
+/**\r
+ * task. h\r
+ * <pre>BaseType_t xTaskAbortDelay( TaskHandle_t xTask );</pre>\r
+ *\r
+ * INCLUDE_xTaskAbortDelay must be defined as 1 in FreeRTOSConfig.h for this\r
+ * function to be available.\r
+ *\r
+ * A task will enter the Blocked state when it is waiting for an event.  The\r
+ * event it is waiting for can be a temporal event (waiting for a time), such\r
+ * as when vTaskDelay() is called, or an event on an object, such as when\r
+ * xQueueReceive() or ulTaskNotifyTake() is called.  If the handle of a task\r
+ * that is in the Blocked state is used in a call to xTaskAbortDelay() then the\r
+ * task will leave the Blocked state, and return from whichever function call\r
+ * placed the task into the Blocked state.\r
+ *\r
+ * @param xTask The handle of the task to remove from the Blocked state.\r
+ *\r
+ * @return If the task referenced by xTask was not in the Blocked state then\r
+ * pdFAIL is returned.  Otherwise pdPASS is returned.\r
+ *\r
+ * \defgroup xTaskAbortDelay xTaskAbortDelay\r
+ * \ingroup TaskCtrl\r
+ */\r
+BaseType_t xTaskAbortDelay( TaskHandle_t xTask );\r
+\r
 /**\r
  * task. h\r
  * <pre>UBaseType_t uxTaskPriorityGet( TaskHandle_t xTask );</pre>\r
diff --git a/FreeRTOS/Source/portable/MemMang/ReadMe.url b/FreeRTOS/Source/portable/MemMang/ReadMe.url
new file mode 100644 (file)
index 0000000..b04bfe3
--- /dev/null
@@ -0,0 +1,5 @@
+[{000214A0-0000-0000-C000-000000000046}]\r
+Prop3=19,2\r
+[InternetShortcut]\r
+URL=http://www.freertos.org/a00111.html\r
+IDList=\r
index a259d267b3cb9ff597936b51ea517cfc898c573f..b22b36bf1e445f1ff5ad454228c6e81ae865809a 100644 (file)
@@ -3,11 +3,12 @@ components and are common to every port, and one or more files that are
 specific to a particular microcontroller and/or compiler.\r
 \r
 \r
-+ The FreeRTOS/Source/Portable/MemMang directory contains the three sample\r
++ The FreeRTOS/Source/Portable/MemMang directory contains the five sample\r
 memory allocators as described on the http://www.FreeRTOS.org WEB site.\r
 \r
 + The other directories each contain files specific to a particular\r
-microcontroller or compiler.\r
+microcontroller or compiler, where the directory name denotes the compiler\r
+specific files the directory contains.\r
 \r
 \r
 \r
index 57bdcdbde2e5efce0afda4856b89c7fe09b9b6e3..3a6aea92a155fb7d211d48690a8770898fda50a8 100644 (file)
@@ -303,7 +303,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                        it will be possible to write to it. */\r
                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )\r
                        {\r
-                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE )\r
+                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )\r
                                {\r
                                        queueYIELD_IF_USING_PREEMPTION();\r
                                }\r
@@ -651,7 +651,7 @@ Queue_t *pxNewQueue;
                        /* pdPASS will only be returned if the mutex was successfully\r
                        obtained.  The calling task may have entered the Blocked state\r
                        before reaching here. */\r
-                       if( xReturn == pdPASS )\r
+                       if( xReturn != pdFAIL )\r
                        {\r
                                ( pxMutex->u.uxRecursiveCallCount )++;\r
                        }\r
@@ -732,7 +732,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                {\r
                                        if( pxQueue->pxQueueSetContainer != NULL )\r
                                        {\r
-                                               if( prvNotifyQueueSetContainer( pxQueue, xCopyPosition ) == pdTRUE )\r
+                                               if( prvNotifyQueueSetContainer( pxQueue, xCopyPosition ) != pdFALSE )\r
                                                {\r
                                                        /* The queue is a member of a queue set, and posting\r
                                                        to the queue set caused a higher priority task to\r
@@ -750,7 +750,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                                queue then unblock it now. */\r
                                                if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )\r
                                                {\r
-                                                       if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE )\r
+                                                       if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )\r
                                                        {\r
                                                                /* The unblocked task has a priority higher than\r
                                                                our own so yield immediately.  Yes it is ok to\r
@@ -783,7 +783,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                        queue then unblock it now. */\r
                                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )\r
                                        {\r
-                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE )\r
+                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )\r
                                                {\r
                                                        /* The unblocked task has a priority higher than\r
                                                        our own so yield immediately.  Yes it is ok to do\r
@@ -920,7 +920,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                        queue then unblock it now. */\r
                                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )\r
                                        {\r
-                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE )\r
+                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )\r
                                                {\r
                                                        /* The unblocked task has a priority higher than\r
                                                        our own so yield immediately. */\r
@@ -1031,7 +1031,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
 \r
                                                if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )\r
                                                {\r
-                                                       if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE )\r
+                                                       if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )\r
                                                        {\r
                                                                portYIELD_WITHIN_API();\r
                                                        }\r
@@ -1191,7 +1191,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                {\r
                                        if( pxQueue->pxQueueSetContainer != NULL )\r
                                        {\r
-                                               if( prvNotifyQueueSetContainer( pxQueue, xCopyPosition ) == pdTRUE )\r
+                                               if( prvNotifyQueueSetContainer( pxQueue, xCopyPosition ) != pdFALSE )\r
                                                {\r
                                                        /* The queue is a member of a queue set, and posting\r
                                                        to the queue set caused a higher priority task to\r
@@ -1352,7 +1352,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                                {\r
                                        if( pxQueue->pxQueueSetContainer != NULL )\r
                                        {\r
-                                               if( prvNotifyQueueSetContainer( pxQueue, queueSEND_TO_BACK ) == pdTRUE )\r
+                                               if( prvNotifyQueueSetContainer( pxQueue, queueSEND_TO_BACK ) != pdFALSE )\r
                                                {\r
                                                        /* The semaphore is a member of a queue set, and\r
                                                        posting to the queue set caused a higher priority\r
@@ -1506,7 +1506,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
 \r
                                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )\r
                                        {\r
-                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE )\r
+                                               if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )\r
                                                {\r
                                                        queueYIELD_IF_USING_PREEMPTION();\r
                                                }\r
@@ -2019,7 +2019,7 @@ static void prvUnlockQueue( Queue_t * const pxQueue )
                        {\r
                                if( pxQueue->pxQueueSetContainer != NULL )\r
                                {\r
-                                       if( prvNotifyQueueSetContainer( pxQueue, queueSEND_TO_BACK ) == pdTRUE )\r
+                                       if( prvNotifyQueueSetContainer( pxQueue, queueSEND_TO_BACK ) != pdFALSE )\r
                                        {\r
                                                /* The queue is a member of a queue set, and posting to\r
                                                the queue set caused a higher priority task to unblock.\r
@@ -2033,8 +2033,9 @@ static void prvUnlockQueue( Queue_t * const pxQueue )
                                }\r
                                else\r
                                {\r
-                                       /* Tasks that are removed from the event list will get added to\r
-                                       the pending ready list as the scheduler is still suspended. */\r
+                                       /* Tasks that are removed from the event list will get\r
+                                       added to the pending ready list as the scheduler is still\r
+                                       suspended. */\r
                                        if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )\r
                                        {\r
                                                if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )\r
index 3dcb0049e342140069cba1af7b5ee4eb7df926cc..4f2c29baded9276cc34bec0908d6f443182c14ad 100644 (file)
@@ -199,8 +199,12 @@ typedef struct tskTaskControlBlock
                volatile uint8_t ucNotifyState;\r
        #endif\r
 \r
-       #if ( configSUPPORT_STATIC_ALLOCATION == 1 )\r
-               uint8_t         ucStaticAllocationFlags; /* Set to pdTRUE if the stack is a statically allocated array, and pdFALSE if the stack is dynamically allocated. */\r
+       #if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+               uint8_t ucStaticAllocationFlags; /* Set to pdTRUE if the stack is a statically allocated array, and pdFALSE if the stack is dynamically allocated. */\r
+       #endif\r
+\r
+       #if( INCLUDE_xTaskAbortDelay == 1 )\r
+               uint8_t ucDelayAborted;\r
        #endif\r
 \r
 } tskTCB;\r
@@ -210,8 +214,8 @@ below to enable the use of older kernel aware debuggers. */
 typedef tskTCB TCB_t;\r
 \r
 /*\r
- * Some kernel aware debuggers require the data the debugger needs access to to\r
- * be global, rather than file scope.\r
+ * Some kernel aware debuggers require the data the debugger needs access to be\r
+ * global, rather than file scope.\r
  */\r
 #ifdef portREMOVE_STATIC_QUALIFIER\r
        #define static\r
@@ -1244,7 +1248,7 @@ StackType_t *pxTopOfStack;
                                        mtCOVERAGE_TEST_MARKER();\r
                                }\r
 \r
-                               if( xYieldRequired == pdTRUE )\r
+                               if( xYieldRequired != pdFALSE )\r
                                {\r
                                        taskYIELD_IF_USING_PREEMPTION();\r
                                }\r
@@ -1415,7 +1419,7 @@ StackType_t *pxTopOfStack;
                {\r
                        taskENTER_CRITICAL();\r
                        {\r
-                               if( prvTaskIsTaskSuspended( pxTCB ) == pdTRUE )\r
+                               if( prvTaskIsTaskSuspended( pxTCB ) != pdFALSE )\r
                                {\r
                                        traceTASK_RESUME( pxTCB );\r
 \r
@@ -1484,7 +1488,7 @@ StackType_t *pxTopOfStack;
 \r
                uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();\r
                {\r
-                       if( prvTaskIsTaskSuspended( pxTCB ) == pdTRUE )\r
+                       if( prvTaskIsTaskSuspended( pxTCB ) != pdFALSE )\r
                        {\r
                                traceTASK_RESUME_FROM_ISR( pxTCB );\r
 \r
@@ -1769,7 +1773,7 @@ BaseType_t xAlreadyYielded = pdFALSE;
                                        mtCOVERAGE_TEST_MARKER();\r
                                }\r
 \r
-                               if( xYieldPending == pdTRUE )\r
+                               if( xYieldPending != pdFALSE )\r
                                {\r
                                        #if( configUSE_PREEMPTION != 0 )\r
                                        {\r
@@ -1933,6 +1937,9 @@ UBaseType_t uxTaskGetNumberOfTasks( void )
        UBaseType_t uxQueue = configMAX_PRIORITIES;\r
        TCB_t* pxTCB;\r
 \r
+               /* Task names will be truncated to configMAX_TASK_NAME_LEN - 1 bytes. */\r
+               configASSERT( strlen( pcNameToQuery ) < configMAX_TASK_NAME_LEN );\r
+\r
                vTaskSuspendAll();\r
                {\r
                        /* Search the ready lists. */\r
@@ -2094,6 +2101,80 @@ implementations require configUSE_TICKLESS_IDLE to be set to a value other than
 #endif /* configUSE_TICKLESS_IDLE */\r
 /*----------------------------------------------------------*/\r
 \r
+#if ( INCLUDE_xTaskAbortDelay == 1 )\r
+\r
+       BaseType_t xTaskAbortDelay( TaskHandle_t xTask )\r
+       {\r
+       TCB_t *pxTCB = ( TCB_t * ) xTask;\r
+       BaseType_t xReturn = pdFALSE;\r
+\r
+               configASSERT( pxTCB );\r
+\r
+               vTaskSuspendAll();\r
+               {\r
+                       /* A task can only be prematurely removed from the Blocked state if\r
+                       it is actually in the Blocked state. */\r
+                       if( eTaskGetState( xTask ) == eBlocked )\r
+                       {\r
+                               /* Remove the reference to the task from the blocked list.  An\r
+                               interrupt won't touch the xGenericListItem because the\r
+                               scheduler is suspended. */\r
+                               ( void ) uxListRemove( &( pxTCB->xGenericListItem ) );\r
+\r
+                               /* Is the task waiting on an event also?  If so remove it from\r
+                               the event list too.  Interrupts can touch the event list item,\r
+                               even though the scheduler is suspended, so a critical section\r
+                               is used. */\r
+                               taskENTER_CRITICAL();\r
+                               {\r
+                                       if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )\r
+                                       {\r
+                                               ( void ) uxListRemove( &( pxTCB->xEventListItem ) );\r
+                                               pxTCB->ucDelayAborted = pdTRUE;\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               mtCOVERAGE_TEST_MARKER();\r
+                                       }\r
+                               }\r
+                               taskEXIT_CRITICAL();\r
+\r
+                               /* Place the unblocked task into the appropriate ready list. */\r
+                               prvAddTaskToReadyList( pxTCB );\r
+\r
+                               /* A task being unblocked cannot cause an immediate context\r
+                               switch if preemption is turned off. */\r
+                               #if (  configUSE_PREEMPTION == 1 )\r
+                               {\r
+                                       /* Preemption is on, but a context switch should only be\r
+                                       performed if the unblocked task has a priority that is\r
+                                       equal to or higher than the currently executing task. */\r
+                                       if( pxTCB->uxPriority > pxCurrentTCB->uxPriority )\r
+                                       {\r
+                                               /* Pend the yield to be performed when the scheduler\r
+                                               is unsuspended. */\r
+                                               xYieldPending = pdTRUE;\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               mtCOVERAGE_TEST_MARKER();\r
+                                       }\r
+                               }\r
+                               #endif /* configUSE_PREEMPTION */\r
+                       }\r
+                       else\r
+                       {\r
+                               mtCOVERAGE_TEST_MARKER();\r
+                       }\r
+               }\r
+               xTaskResumeAll();\r
+\r
+               return xReturn;\r
+       }\r
+\r
+#endif /* INCLUDE_xTaskAbortDelay */\r
+/*----------------------------------------------------------*/\r
+\r
 BaseType_t xTaskIncrementTick( void )\r
 {\r
 TCB_t * pxTCB;\r
@@ -2479,7 +2560,7 @@ void vTaskPlaceOnUnorderedEventList( List_t * pxEventList, const TickType_t xIte
                /* If the task should block indefinitely then set the block time to a\r
                value that will be recognised as an indefinite delay inside the\r
                prvAddCurrentTaskToDelayedList() function. */\r
-               if( xWaitIndefinitely == pdTRUE )\r
+               if( xWaitIndefinitely != pdFALSE )\r
                {\r
                        xTicksToWait = portMAX_DELAY;\r
                }\r
@@ -2624,15 +2705,26 @@ BaseType_t xReturn;
                /* Minor optimisation.  The tick count cannot change in this block. */\r
                const TickType_t xConstTickCount = xTickCount;\r
 \r
+               #if( INCLUDE_xTaskAbortDelay == 1 )\r
+                       if( pxCurrentTCB->ucDelayAborted != pdFALSE )\r
+                       {\r
+                               /* The delay was aborted, which is not the same as a time out,\r
+                               but has the same result. */\r
+                               pxCurrentTCB->ucDelayAborted = pdFALSE;\r
+                               xReturn = pdTRUE;\r
+                       }\r
+                       else\r
+               #endif\r
+\r
                #if ( INCLUDE_vTaskSuspend == 1 )\r
-                       /* If INCLUDE_vTaskSuspend is set to 1 and the block time specified\r
-                       is the maximum block time then the task should block indefinitely,\r
-                       and therefore never time out. */\r
                        if( *pxTicksToWait == portMAX_DELAY )\r
                        {\r
+                               /* If INCLUDE_vTaskSuspend is set to 1 and the block time\r
+                               specified is the maximum block time then the task should block\r
+                               indefinitely, and therefore never time out. */\r
                                xReturn = pdFALSE;\r
                        }\r
-                       else /* We are not blocking indefinitely, perform the checks below. */\r
+                       else\r
                #endif\r
 \r
                if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */\r
@@ -2644,7 +2736,7 @@ BaseType_t xReturn;
                        was called. */\r
                        xReturn = pdTRUE;\r
                }\r
-               else if( ( ( TickType_t ) ( xConstTickCount - pxTimeOut->xTimeOnEntering ) ) < *pxTicksToWait )\r
+               else if( ( ( TickType_t ) ( xConstTickCount - pxTimeOut->xTimeOnEntering ) ) < *pxTicksToWait ) /*lint !e961 Explicit casting is only redundant with some compilers, whereas others require it to prevent integer conversion errors. */\r
                {\r
                        /* Not a genuine timeout. Adjust parameters for time remaining. */\r
                        *pxTicksToWait -= ( xConstTickCount - pxTimeOut->xTimeOnEntering );\r
@@ -2971,6 +3063,12 @@ UBaseType_t x;
                _REENT_INIT_PTR( ( &( pxTCB->xNewLib_reent ) ) );\r
        }\r
        #endif\r
+\r
+       #if( INCLUDE_xTaskAbortDelay == 1 )\r
+       {\r
+               pxTCB->ucDelayAborted = pdFALSE;\r
+       }\r
+       #endif\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -4499,10 +4597,19 @@ TickType_t uxReturn;
 /*-----------------------------------------------------------*/\r
 \r
 \r
-static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, BaseType_t xCanBlockIndefinitely )\r
+static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely )\r
 {\r
 TickType_t xTimeToWake;\r
 \r
+       #if( INCLUDE_xTaskAbortDelay == 1 )\r
+       {\r
+               /* About to enter a delayed list, so ensure the ucDelayAborted flag is\r
+               reset to pdFALSE so it can be detected as having been set to pdTRUE\r
+               when the task leaves the Blocked state. */\r
+               pxCurrentTCB->ucDelayAborted = pdFALSE;\r
+       }\r
+       #endif\r
+\r
        /* Remove the task from the ready list before adding it to the blocked list\r
        as the same list item is used for both lists. */\r
        if( uxListRemove( &( pxCurrentTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 )\r
index c56d3bf212802cb70f853424aec60bf0adf69af8..50645ea1955429a9875cd87ad53c19223aaafbaa 100644 (file)
@@ -454,7 +454,7 @@ Timer_t * const pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTi
                /* The timer is inserted into a list using a time relative to anything\r
                other than the current time.  It will therefore be inserted into the\r
                correct list relative to the time this task thinks it is now. */\r
-               if( prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime ) == pdTRUE )\r
+               if( prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime ) != pdFALSE )\r
                {\r
                        /* The timer expired before it was added to the active timer\r
                        list.  Reload it now.  */\r
@@ -730,7 +730,7 @@ TickType_t xTimeNow;
                            case tmrCOMMAND_RESET_FROM_ISR :\r
                                case tmrCOMMAND_START_DONT_TRACE :\r
                                        /* Start or restart a timer. */\r
-                                       if( prvInsertTimerInActiveList( pxTimer,  xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) == pdTRUE )\r
+                                       if( prvInsertTimerInActiveList( pxTimer,  xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE )\r
                                        {\r
                                                /* The timer expired before it was added to the active\r
                                                timer list.  Process it now. */\r