Beispiel #1
0
static void task_0_tick_handler(TASK_0_EVENT_TYPE ev, void *event_data)
{
	event_data = event_data;

	#if (CONFIG_RAW_USER_HOOK > 0)
	raw_tick_hook();
	#endif

	/*update system time to calculate whether task timeout happens*/
	#if (CONFIG_RAW_TICK_TASK > 0)
	raw_task_semaphore_put(&tick_task_obj);
	#else
	tick_list_update();
	#endif

	/*update task time slice if possible*/
	#if (CONFIG_SCHED_FIFO_RR > 0)
	calculate_time_slice(ev);
	#endif
	
	/*inform the timer task to update software timer*/	
	#if (CONFIG_RAW_TIMER > 0)
	call_timer_task();
	#endif

}
Beispiel #2
0
void tick_work_handler(RAW_U32 arg, void *msg)
{
	msg = msg;

	#if (CONFIG_RAW_USER_HOOK > 0)
	raw_tick_hook();
	#endif

	/*update system time to calculate whether task timeout happens*/
	/*Need not another task to handle tick process*/
	tick_list_update();

	/*update task time slice if possible*/
	/*arg is important!Please refer to example how to use it*/
	#if (CONFIG_SCHED_FIFO_RR > 0)
	calculate_time_slice(arg);
	#endif
	
	/*inform the timer task to update software timer*/	
	#if (CONFIG_RAW_TIMER > 0)
	call_timer_task();
	#endif

}
Beispiel #3
0
/*
************************************************************************************************************************
*                                       Timer tick function
*
* Description: This function is called by timer interrupt.
*
* Arguments  :None
*                
*                 
*
*				         
* Returns		 None
*						
* Note(s)    Called by your own timer interrupt.
*
*             
************************************************************************************************************************
*/
void raw_time_tick(void)
{
	#if (CONFIG_RAW_USER_HOOK > 0)
	raw_tick_hook();
	#endif

	/*update system time to calculate whether task timeout happens*/
	#if (CONFIG_RAW_TICK_TASK > 0)
	raw_task_semaphore_put(&tick_task_obj);
	#else
	tick_list_update();
	#endif

	/*update task time slice if possible*/
	#if (CONFIG_SCHED_FIFO_RR > 0)
	calculate_time_slice(raw_task_active->priority);
	#endif

	/*inform the timer task to update software timer*/	
	#if (CONFIG_RAW_TIMER > 0)
	call_timer_task();
	#endif
	
}