ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Пятница
26 апреля
528356 Топик полностью
Codavr (07.07.2014 14:39 - 14:43, просмотров: 365) ответил Vit на вероятно ругань при кастинге с volatile неуклюже обходили
Епта. Это как!!! 1)
static BaseType_t prvTaskIsTaskSuspended( const TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
#if ( INCLUDE_vTaskSuspend == 1 )
static BaseType_t prvTaskIsTaskSuspended( const TaskHandle_t xTask ) PRIVILEGED_FUNCTION;
#endif /* INCLUDE_vTaskSuspend */
2)
static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake )
{
	/* The list item will be inserted in wake time order. */
	listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake );

	if( xTimeToWake < xTickCount )
	{
		/* Wake time has overflowed.  Place this item in the overflow list. */
		vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) );
	}
	else
	{
		/* The wake time has not overflowed, so the current block list is used. */
		vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) );

		/* If the task entering the blocked state was placed at the head of the
		list of blocked tasks then xNextTaskUnblockTime needs to be updated
		too. */
		if( xTimeToWake < xNextTaskUnblockTime )
		{
			xNextTaskUnblockTime = xTimeToWake;
		}
		else
		{
			mtCOVERAGE_TEST_MARKER();
		}
	}
}
atic void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake )
{
    xList xlXList;
    xListItem xliXListItem;

	/* The list item will be inserted in wake time order. */
	listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake );

	if( xTimeToWake < xTickCount )
	{
        /* Wake time has overflowed. Place this item in the overflow list. */
        xlXList = *((xList *) pxOverflowDelayedTaskList);
        xliXListItem = *((xListItem *) &( pxCurrentTCB->xGenericListItem ));
        vListInsert( &xlXList, &xliXListItem);
	}
	else
	{
        /* The wake time has not overflowed, so we can use the current block list. */
        xlXList = *((xList *) pxDelayedTaskList);
        xliXListItem = *((xListItem *) &( pxCurrentTCB->xGenericListItem ));
        vListInsert( pxDelayedTaskList, &xliXListItem);
//        vListInsert( &xlXList, &xliXListItem);

		/* If the task entering the blocked state was placed at the head of the
		list of blocked tasks then xNextTaskUnblockTime needs to be updated
		too. */
		if( xTimeToWake < xNextTaskUnblockTime )
		{
			xNextTaskUnblockTime = xTimeToWake;
		}
		else
		{
			mtCOVERAGE_TEST_MARKER();
		}
	}
}
3)
	listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xEventListItem ), ( ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxCurrentTCB->uxPriority ) ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */

	//listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xEventListItem ), ( ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxCurrentTCB->uxPriority ) ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
    //замена чтобы избавиться от варнинга
    TickType_t uxPriority;
    ListItem_t xliXListItem;
	uxPriority = ( TickType_t ) configMAX_PRIORITIES;
    uxPriority -= ( TickType_t ) pxCurrentTCB->uxPriority;
	xliXListItem = *((xListItem *) &( pxCurrentTCB->xGenericListItem ));
    xliXListItem = xliXListItem;    // это чтобы избавиться от другого варнинга
    listSET_LIST_ITEM_VALUE( &xliXListItem, uxPriority);
    //конец замены

Долой империалистический интернационал!