in Z88DK/Z180/port.c [254:283]
void timer_isr(void) __preserves_regs(a,b,c,d,e,h,l,iyh,iyl) __naked
{
#if configUSE_PREEMPTION == 1
/*
* Tick ISR for preemptive scheduler. We can use a naked attribute as
* the context is saved at the start of timer_isr(). The tick
* count is incremented after the context is saved.
*
* Context switch function used by the tick. This must be identical to
* vPortYield() from the call to vTaskSwitchContext() onwards. The only
* difference from vPortYield() is the tick count is incremented as the
* call comes from the tick ISR.
*/
portSAVE_CONTEXT_IN_ISR();
configRESET_TIMER_INTERRUPT();
xTaskIncrementTick();
vTaskSwitchContext();
portRESTORE_CONTEXT_IN_ISR();
#else
/*
* Tick ISR for the cooperative scheduler. All this does is increment the
* tick count. We don't need to switch context, this can only be done by
* manual calls to taskYIELD();
*/
portSAVE_CONTEXT_IN_ISR();
configRESET_TIMER_INTERRUPT();
xTaskIncrementTick();
portRESTORE_CONTEXT_IN_ISR();
#endif
} // configUSE_PREEMPTION