void IBN_ListTaskWithinSingleList (xList *pxList, char *pcStatus )
{
	volatile tskTCB *pxNextTCB, *pxFirstTCB;
	u16 usStackRemaining;

	u64 ullTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();
	u64 ullStatsAsPercentage;

	/* Write the details of all the TCB's in pxList into the buffer. */
	listGET_OWNER_OF_NEXT_ENTRY( pxFirstTCB, pxList );
	do
	{
		listGET_OWNER_OF_NEXT_ENTRY( pxNextTCB, pxList );

		usStackRemaining = usTaskCheckFreeStackSpace( ( unsigned char * ) pxNextTCB->pxStack );
		ullStatsAsPercentage = (u64)0;
		if ((u64)0 != ullTotalRunTime)
		{
			ullStatsAsPercentage  =  (u64)10000 * (u64)(pxNextTCB->ullRunTimeCounter);
			ullStatsAsPercentage /=  ullTotalRunTime;
		}

		CI_LocalPrintf("%-21.21s ", pxNextTCB->pcTaskName);
		CI_LocalPrintf("%s   ", pcStatus);
		CI_LocalPrintf("%u  ", ( unsigned int ) pxNextTCB->uxPriority);
		CI_LocalPrintf("%5u ", usStackRemaining);
		CI_LocalPrintf("%10u ", (u32)(pxNextTCB->ullRunTimeCounter / 60ULL));
		CI_LocalPrintf("%s ", TIME_MEASURING_ShortText (pxNextTCB->ullRunTimeCounter / 60ULL));

		CI_LocalPrintf("%6.2f %% ",(float)ullStatsAsPercentage/100.0);
		CI_LocalPrintf("%7u \r\n", pxNextTCB->ulRunCounter);

//		CI_LocalPrintf( ( char * ) "%-21.21s %s   %u  %5u %9u %6.2f %%\r\n", pxNextTCB->pcTaskName, pcStatus, ( unsigned int ) pxNextTCB->uxPriority, usStackRemaining,pxNextTCB->ullRunTimeCounter/60,(float)ullStatsAsPercentage/100.0);
	} while( pxNextTCB != pxFirstTCB );
}
void vCoRoutineSchedule( void )
{
	/* See if any co-routines readied by events need moving to the ready lists. */
	prvCheckPendingReadyList();

	/* See if any delayed co-routines have timed out. */
	prvCheckDelayedList();

	/* Find the highest priority queue that contains ready co-routines. */
	while( listLIST_IS_EMPTY( &( pxReadyCoRoutineLists[ uxTopCoRoutineReadyPriority ] ) ) )
	{
		if( uxTopCoRoutineReadyPriority == 0 )
		{
			/* No more co-routines to check. */
			return;
		}
		--uxTopCoRoutineReadyPriority;
	}

	/* listGET_OWNER_OF_NEXT_ENTRY walks through the list, so the co-routines
	 of the	same priority get an equal share of the processor time. */
	listGET_OWNER_OF_NEXT_ENTRY( pxCurrentCoRoutine, &( pxReadyCoRoutineLists[ uxTopCoRoutineReadyPriority ] ) );

	/* Call the co-routine. */
	( pxCurrentCoRoutine->pxCoRoutineFunction )( pxCurrentCoRoutine, pxCurrentCoRoutine->uxIndex );

	return;
}
void IBN_GetTaskListEntrys (xList *pxList,u8 State_u8)
{
	volatile tskTCB *pxNextTCB, *pxFirstTCB;

	listGET_OWNER_OF_NEXT_ENTRY( pxFirstTCB, pxList);
	do
	{
		listGET_OWNER_OF_NEXT_ENTRY( pxNextTCB, pxList );
		IBN_Tasklist_st[IBN_TasklistCounter_u8]      = (tskTCB *)pxNextTCB;
		IBN_TasklistState_u8[IBN_TasklistCounter_u8] = State_u8;
		if (IBN_MAX_TASK_LIST <= IBN_TasklistCounter_u8)
		{
			return;
		}
		IBN_TasklistCounter_u8++;
	} while( pxNextTCB != pxFirstTCB );
}