tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: adding functions for easy access to cycle counters

On Mar 6, 2008, at 7:38 AM, Blair Sadewitz wrote:


Does anyone have an opinion on adding functions in
src/common/lib/libc/atomic for reading CPU cycle counters?  I thought
of this while working on a JACK audio package:  I've already converted
it to use the atomic ops in userland.  If I had an MI function to read
the cycle counter, e.g. rtdsc on x86, then it could build easily on
any platform NetBSD-current supports.

These functions don't _have_ to be located with the atomic ops, I just
figured it was a logical place to put them.

Not all platforms have cycle counters, and those that do have different
types.  Some are 32bit while others are 64bit.

Hence these are MD and should not be in libc.

Home | Main Index | Thread Index | Old Index