Minor updates to the queue.c and tasks.c core files required to support the new timers implementation.

This commit is contained in:
Richard Barry 2011-02-09 19:21:58 +00:00
parent 9d9b00b669
commit 559532329d
2 changed files with 47 additions and 1 deletions

View file

@ -1440,7 +1440,7 @@ signed portBASE_TYPE xReturn;
}
#endif
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/
#if configQUEUE_REGISTRY_SIZE > 0
@ -1463,4 +1463,27 @@ signed portBASE_TYPE xReturn;
}
#endif
/*-----------------------------------------------------------*/
#if configUSE_TIMERS == 1
void vQueueWaitForMessageRestricted( xQueueHandle pxQueue, portTickType xTicksToWait )
{
/* This function should not be called by application code hence the
'Restricted' in its name. It is not part of the public API. It is designed
for use by kernel code, and has special calling requirements - it should be
called from a critical section, and then a yield performed after it is
called. Also, the call tree makes use of vListInsert() which should normally
not be called from a critical section - so an assumption is made that the list
being inserted into is empty and therefore the insertion will be fast. */
/* Only do anything if there are no message in the queue. */
if( pxQueue->uxMessagesWaiting == ( unsigned portBASE_TYPE ) 0U )
{
/* There is nothing in the queue, block for the specified period. */
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
}
}
#endif