From d249e2f25d104c99f8b1e12673f53203d6c2f51d Mon Sep 17 00:00:00 2001 From: deischen Date: Fri, 18 Feb 2005 16:07:05 +0000 Subject: 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 --- lib/libpthread/thread/thr_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libpthread') diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c index f963789..c143627 100644 --- a/lib/libpthread/thread/thr_init.c +++ b/lib/libpthread/thread/thr_init.c @@ -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; -- cgit v1.1