[lkml]   [2001]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: How to know HZ from userspace?
At 5:07 PM -0700 2001-05-30, H. Peter Anvin wrote:
> > If you now want to set those values from a userspace program / script in
>> a portable manner, you need to be able to find out of HZ of the currently
>> running kernel.
>Yes, but that's because the interfaces are broken. The decision has
>been that these values should be exported using the default HZ for the
>architecture, and that it is the kernel's responsibility to scale them
>when HZ != USER_HZ. I don't know if any work has been done in this

FWIW (perhaps not much in this context), the POSIX way is sysconf(_SC_CLK_TCK)

POSIX sysconf is pretty useful for this kind of thing (not just HZ, either).
/Jonathan Lundell.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:54    [W:0.136 / U:6.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site