The HyperNews Linux KHG Discussion Pages

Feedback: loops_per_sec defined in kernel symbole table

Forum: Supporting Functions
Re: Question problems with udelay (Bill Blackwell)
Date: Sun, 15 Mar 1998 03:40:46 GMT
From: Horvai Peter <horvai@ens.fr>

loops_per_sec is defined in the kernel symbol table. So when you compile your module to object code (you can not make it executable, because it normally relies on functions and variables defined in the kernel), you have, as defined in linux/delay.h: extern unsigned long loops_per_sec; Now a "ksyms -a" gives you that this symbol is defined in the kernel. It is quite reasonable that this value should be dynamically (at least in a machine dependant manner) defined. As it is stated in asm/delay.h: Delay routines, using a pre-computed "loops_per_second" value.