lkml.org 
[lkml]   [2003]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Clock monotonic a suggestion
On Fri, Mar 21, 2003 at 02:17:44PM +0100, Martin Waitz wrote:
> why don't you simply use asm("rdtsc") ?
> (ok, you should make sure that you always ask the same processor and
> stuff, but using the built in TSC seems to do everything you want...)

It does. That's the point. monotonic_clock() is intended as a
portable and consistent wrapper around such access. Otherwise, any
module that needs such access must do system specific work (TSC on x86,
cyclone on x86-x440, other stuff on S/390, etc). In addition, having
speedstep handling in one place is a good thing.

Joel

--

Life's Little Instruction Book #335

"Every so often, push your luck."

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
-
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/

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