clkdiff = cp0_get_count() - cpu_counter_last; if (clkdiff > 0) { cpu_counter_last += cpu_counter_interval; pendingticks++; cp0_set_compare(cpu_counter_last); }
clock_int5( intrmask_t mask, struct trap_frame *tf){	u_int32_t clkdiff;	/*	 * If clock is started count the tick, else just arm for a new.	 */	if (clock_started && cpu_counter_interval != 0) {		clkdiff = cp0_get_count() - cpu_counter_last;		while (clkdiff >= cpu_counter_interval) {			cpu_counter_last += cpu_counter_interval;			clkdiff = cp0_get_count() - cpu_counter_last;			pendingticks++;		}		cpu_counter_last += cpu_counter_interval;		pendingticks++;	} else {		cpu_counter_last = cpu_counter_interval + cp0_get_count();	}	cp0_set_compare(cpu_counter_last);	if ((tf->cpl & SPL_CLOCKMASK) == 0) {		while (pendingticks) {			clk_count.ec_count++;			hardclock(tf);			pendingticks--;		}	}	return CR_INT_5;	/* Clock is always on 5 */}