Somewhere along the line, tick accumulation for SA threads was

changed to use the statclock.  Make sure we calculate the value
of a tick correctly in userland.

Noticed by:	Kazuaki Oda <kaakun at highway dot ne dot jp>
This commit is contained in:
deischen 2005-02-18 16:07:05 +00:00
parent 0c6289b326
commit d249e2f25d
2 changed files with 2 additions and 2 deletions

View File

@ -421,7 +421,7 @@ init_private(void)
mib[1] = KERN_CLOCKRATE;
len = sizeof (struct clockinfo);
if (sysctl(mib, 2, &clockinfo, &len, NULL, 0) == 0)
_clock_res_usec = clockinfo.tick;
_clock_res_usec = 1000000 / clockinfo.stathz;
else
_clock_res_usec = CLOCK_RES_USEC;

View File

@ -421,7 +421,7 @@ init_private(void)
mib[1] = KERN_CLOCKRATE;
len = sizeof (struct clockinfo);
if (sysctl(mib, 2, &clockinfo, &len, NULL, 0) == 0)
_clock_res_usec = clockinfo.tick;
_clock_res_usec = 1000000 / clockinfo.stathz;
else
_clock_res_usec = CLOCK_RES_USEC;