MCPcopy Create free account
hub / github.com/FreeRTOS/FreeRTOS-Kernel / vTaskPlaceOnEventListRestricted

Function vTaskPlaceOnEventListRestricted

tasks.c:3935–3963  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3933#if ( configUSE_TIMERS == 1 )
3934
3935 void vTaskPlaceOnEventListRestricted( List_t * const pxEventList,
3936 TickType_t xTicksToWait,
3937 const BaseType_t xWaitIndefinitely )
3938 {
3939 configASSERT( pxEventList );
3940
3941 /* This function should not be called by application code hence the
3942 * 'Restricted' in its name. It is not part of the public API. It is
3943 * designed for use by kernel code, and has special calling requirements -
3944 * it should be called with the scheduler suspended. */
3945
3946
3947 /* Place the event list item of the TCB in the appropriate event list.
3948 * In this case it is assume that this is the only task that is going to
3949 * be waiting on this event list, so the faster vListInsertEnd() function
3950 * can be used in place of vListInsert. */
3951 vListInsertEnd( pxEventList, &( pxCurrentTCB->xEventListItem ) );
3952
3953 /* If the task should block indefinitely then set the block time to a
3954 * value that will be recognised as an indefinite delay inside the
3955 * prvAddCurrentTaskToDelayedList() function. */
3956 if( xWaitIndefinitely != pdFALSE )
3957 {
3958 xTicksToWait = portMAX_DELAY;
3959 }
3960
3961 traceTASK_DELAY_UNTIL( ( xTickCount + xTicksToWait ) );
3962 prvAddCurrentTaskToDelayedList( xTicksToWait, xWaitIndefinitely );
3963 }
3964
3965#endif /* configUSE_TIMERS */
3966/*-----------------------------------------------------------*/

Callers 1

Calls 2

vListInsertEndFunction · 0.85

Tested by

no test coverage detected