Divide the Alpha's hz of 1024 by 8 to obain a stathz of 128. This

fixes "nice" on the alpha.

obtained from: NetBSD
reviewed by: dfr
This commit is contained in:
Andrew Gallatin 1999-10-13 19:18:29 +00:00
parent 81f4abc9c1
commit 6e54edbfb3
2 changed files with 8 additions and 1 deletions

View File

@ -187,6 +187,7 @@ cpu_initclocks()
alpha_timecounter.tc_frequency = freq;
init_timecounter(&alpha_timecounter);
stathz = 128;
platform.clockintr = (void (*) __P((void *))) handleclock;
/*

View File

@ -67,6 +67,8 @@ dummy_perf(unsigned long vector, struct trapframe *framep)
void (*perf_irq)(unsigned long, struct trapframe *) = dummy_perf;
static u_int schedclk2;
void
interrupt(a0, a1, a2, framep)
unsigned long a0, a1, a2;
@ -95,8 +97,12 @@ interrupt(a0, a1, a2, framep)
#else
intrcnt[INTRCNT_CLOCK]++;
#endif
if (platform.clockintr)
if (platform.clockintr){
(*platform.clockintr)(framep);
/* divide hz (1024) by 8 to get stathz (128) */
if((++schedclk2 & 0x7) == 0)
statclock((struct clockframe *)framep);
}
break;
case ALPHA_INTR_ERROR: /* Machine Check or Correctable Error */