/* * Handler for the timer interrupt. This is the handler that the application * defined callback function vApplicationSetupTimerInterrupt() should install. */ void vPortTickISR( void *pvUnused ) { extern void vApplicationClearTimerInterrupt( void ); /* Ensure the unused parameter does not generate a compiler warning. */ ( void ) pvUnused; /* This port uses an application defined callback function to clear the tick interrupt because the kernel will run on lots of different MicroBlaze and FPGA configurations - not all of which will have the same timer peripherals defined or available. An example definition of vApplicationClearTimerInterrupt() is provided in the official demo application that accompanies this port. */ vApplicationClearTimerInterrupt(); /* Increment the RTOS tick - this might cause a task to unblock. */ vTaskIncrementTick(); /* If the preemptive scheduler is being used then a context switch should be requested in case incrementing the tick unblocked a task, or a time slice should cause another task to enter the Running state. */ #if configUSE_PREEMPTION == 1 /* Force vTaskSwitchContext() to be called as the interrupt exits. */ ulTaskSwitchRequested = 1; #endif }
/* * Handler for the timer interrupt. This is the handler that the application * defined callback function vApplicationSetupTimerInterrupt() should install. */ void vPortTickISR( void *pvUnused ) { extern void vApplicationClearTimerInterrupt( void ); /* Ensure the unused parameter does not generate a compiler warning. */ ( void ) pvUnused; /* This port uses an application defined callback function to clear the tick interrupt because the kernel will run on lots of different MicroBlaze and FPGA configurations - not all of which will have the same timer peripherals defined or available. An example definition of vApplicationClearTimerInterrupt() is provided in the official demo application that accompanies this port. */ vApplicationClearTimerInterrupt(); /* Increment the RTOS tick - this might cause a task to unblock. */ if( xTaskIncrementTick() != pdFALSE ) { /* Force vTaskSwitchContext() to be called as the interrupt exits. */ ulTaskSwitchRequested = 1; } }