Re: maximum value that sched_clock() can return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 27, 2006 at 09:49:39PM +0000, Mauricio Lin wrote:
> Hi all,
> 
> Since sched_clock() function is implemented differently for each arch,
> how can I figure out the maximum value sched_clock can return?
> 
> As sched_clock() has its return value reset to zero when the maximum
> value is reached, how can i get the maximum value supported by a
> certain arch?
> 
> BR,
> 
> Mauricio Lin.
Hi,

have a look at the definition of the function. The i386 one can be found
here :
	http://sosdg.org/~coywolf/lxr/source/arch/i386/kernel/timers/timer_tsc.c#L150

The prototype of the function is :
	unsigned long long sched_clock(void);

This means that the maximum number returned by the sched_clock function
is 2^64 - 1

-- 
tyler
tyler@xxxxxxxx


	

	
		
___________________________________________________________________________ 
Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement vos services préférés : vérifiez vos nouveaux mails, lancez vos recherches et suivez l'actualité en temps réel. 
Rendez-vous sur http://fr.yahoo.com/set


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux