Re: Illegal use of reserved word in system.h

From: Ben Greear
Date: Fri May 20 2005 - 12:00:18 EST


Lee Revell wrote:
On Fri, 2005-05-20 at 11:27 +0200, Helge Hafting wrote:

Ben Greear wrote:


Arjan van de Ven wrote:


HZ may not exist. At all; people are trying to remove it. And userspace
has no business knowing about it either.


It can be helpful to know what HZ you are running at, for instance if you care
very much about the (average) precision of a select/poll timeout.


Will knowing it help? You may find out that you don't have much precision,
but then theres nothing to do about it.


Yes, it will. If you have an RT constraint and 10ms won't cut it (say,
you want to send MIDI clock) then you can use the RTC.

Right. For instance, before I found the 1000 HZ patch for the 2.4
kernel I would set the RTC to tick 1024 times a second, and then add
that FD to my select() fd-sets. That causes select to return after about
1ms, and I could do this in a loop to get the X ms of sleep that I needed.

This is not as nice as having a clean 1ms tick clock, but it's a hell of
a lot better than a full busy spin...

Ben

--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc http://www.candelatech.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/