void SysTick_Handler( void ) { portDISABLE_INTERRUPTS(); tpl_call_counter_tick(); portENABLE_INTERRUPTS(); }
/* * The signal handler used when interrupts are enabled */ void tpl_signal_handler(int sig) { #ifdef WITH_AUTOSAR_TIMING_PROTECTION struct itimerval timer; #endif /* WITH_AUTOSAR_TIMING_PROTECTION */ #ifndef NO_ISR unsigned int id; #endif /* NO_ISR */ #ifndef NO_ALARM if (signal_for_counters == sig) tpl_call_counter_tick(); #endif /* NO_ALARM */ #if (defined WITH_AUTOSAR && !defined NO_SCHEDTABLE) || (!defined NO_ALARM) if (signal_for_counters == sig) tpl_call_counter_tick(); #endif /*(defined WITH_AUTOSAR && !defined NO_SCHEDTABLE) || ... */ #ifdef WITH_AUTOSAR_TIMING_PROTECTION if (sig == SIGALRM) { /* disable the interval timer (one shot) */ timer.it_value.tv_sec = 0; timer.it_value.tv_usec = 0; timer.it_interval.tv_sec = 1; timer.it_interval.tv_usec = 0; setitimer (ITIMER_REAL, &timer, NULL); if (tpl_watchdog_callback != NULL) { if (tpl_watchdog_callback ()) tpl_schedule((u8)FROM_IT_LEVEL); } } #endif /* WITH_AUTOSAR_TIMING_PROTECTION */ #ifndef NO_ISR for (id = 0; id < ISR_COUNT; id++) { if (signal_for_isr_id[id] == sig) { tpl_central_interrupt_handler(id); } } #endif /* NO_ISR */ }