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:
parent
0c6289b326
commit
d249e2f25d
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user