on a SMP system, only the boot processor increases the timer value
This commit is contained in:
parent
36a8ed9e31
commit
ba1cbc97c8
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue