lkml.org 
[lkml]   [2005]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Win32 equivalent to GetTickCount systemcall (i386)
From
Date
On Tue, 2005-12-06 at 12:23 +0100, David Engraf wrote:
> > On Tue, 2005-12-06 at 11:36 +0100, David Engraf wrote:
> > > This patch adds a new systemcall on i386 architectures returning the
> jiffies
> > > value to the application.
> > > As a kernel developer you can use jiffies but from the user space there
> is
> > > no equivalent function which counts every millisecond like the Win32
> > > GetTickCount.
>
> > a few comments
>
> > 1) jiffies are 64 bit not 32
>
> Jiffies is defined as "unsigned long volatile __jiffy_data jiffies". On i386
> machines unsigned long is 32.

but it's a subvariable of jiffies64 which is 64 bit
>
>
> > 2) jiffies are not a constant time, eg HZ is a config option,
> > exposing that internal counter to userspace sounds wrong, after
> > all what would it be used for
>
> Right, HZ is defined as USER_HZ which can be set over the config. On normal
> desktop systems it should be 1000 on other machines it could also be 100 or
> 250. Either we can ignore the setting and the function depends on the
> USER_HZ config, or we have to calculate the right value with USER_HZ.

but then.. why?


-
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-12-06 12:37    [W:0.147 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site