Re: [PATCH] hpet: factor timer allocate from open

From: john stultz
Date: Wed Mar 03 2010 - 11:26:26 EST


On Wed, 2010-03-03 at 01:07 -0800, Magnus Lynch wrote:
> On Mon, Mar 1, 2010 at 12:59 PM, john stultz <johnstul@xxxxxxxxxx> wrote:
> > Yes, CLOCK_MONOTONIC_RAW was added specifically to create a hardware
> > agnostic interface that provided a 1:1 ratio to the hardware cycle
> > counter used by the timekeeping core. No NTP corrections or slewing
> > are applied and it isn't affected by settimeofday calls.
> >
> > Let me know if you run into any trouble with it.
> > thanks
>
> Actually I did run into trouble. CLOCK_MONOTONIC_RAW is defined in
> linux/time.h and including that creates a lot of redefinition
> conflicts with time.h. I see the linux/ includes aren't intended for
> user space code.

Oh, right. Sorry about that, Glibc still hasn't picked these up.

I'll have to chase down how to get that done.

For now, you can just add the following to your code:
#define CLOCK_MONOTONIC_RAW 4

Thanks for bringing it up!
-john


--
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/