thread accounting in libpthread

Daniel Eischen deischen at freebsd.org
Fri Feb 18 08:10:01 PST 2005


On Fri, 18 Feb 2005, Kazuaki Oda wrote:

> Hi,
>
> thr_accounting function (libpthread/thread/thr_kern.c) calculates
> thread->slice_usec, and it uses tm_uticks, tm_sticks and _clock_res_usec.
> I think that kernel counts up tm_uticks and tm_sticks at statclock interrupt
> time, and on -CURRENT _clock_res_usec is 1000 and on 5-STABLE it is 10000.
>
> Does thr_accounting calculate thread->slice_usec correctly?

I just fixed this.  It didn't really affect anything, though, since
it's all relative.  You could have used any bogus number for the
resolution of a tick.

-- 
DE



More information about the freebsd-threads mailing list