high-res-timers start code.

george anzinger (george@mvista.com)
Mon, 23 Apr 2001 13:43:46 -0700


"Robert H. de Vries" wrote:
>
> On Monday 23 April 2001 19:45, you wrote:
>
> > By the way, is the user land stuff the same for all "arch"s?
>
> Not if you plan to handle the CPU cycle counter in user space. That is at
> least what I would propose.

Just got interesting, lets let the world look in.

What did you have in mind here? I suspect that on some archs the cycle
counter is not available to user code. I know that on parisc it is
optionally available (kernel can set a bit to make it available), but by
it self it is only good for intervals. You need to peg some value to a
CLOCK to use it to get timeofday, for instance.

On the other hand, if there is an area of memory that both users and
system can read but only system can write, one might put the soft clock
there. This would allow gettimeofday (with the cycle counter) to work
without a system call. To the best of my knowledge the system does not
have such an area as yet.

comments?

George

> System call stuff, yes. There may be gotcha's in the area of 32/64
> interfaces. Almost all 64 bit archs also support 32 bit interfaces (check out
> the stuff in my patch regarding the SPARC, kindly donated by Jakub Jelinek).
>
> Robert
>
> --
> Robert de Vries
> rhdv@rhdv.cistron.nl
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/