on a SMP system, only the boot processor increases the timer value

This commit is contained in:
Stefan Lankes 2011-07-18 09:10:23 +02:00
parent 36a8ed9e31
commit ba1cbc97c8

View file

@ -61,7 +61,12 @@ int sys_times(struct tms* buffer, clock_t* clock)
static void timer_handler(struct state *s)
{
/* Increment our 'tick counter' */
#if MAX_CORES > 1
if (smp_id() == 0)
timer_ticks++;
#else
timer_ticks++;
#endif
/*
* Every TIMER_FREQ clocks (approximately 1 second), we will