[vortex] How to use gettimeofday inside 3c59x.c ?

Bogdan Costescu bogdan.costescu@iwr.uni-heidelberg.de
Thu, 22 Mar 2001 15:49:56 +0100 (CET)


On Thu, 22 Mar 2001, Marcus Ramos wrote:

> The problem is that, after compiling without erros, insmod will not load
> the module (3c59x.o) because it says it cannot resolve the symbol
> "gettimeofday". If I #include <sys/time.h> and <unistd.h> in the source
> code, as mentioned in man gettimeofday, I get many conflicts due to
> duplicated symbols during compilation.

gettimeofday is a libc function, IIRC. You can use it from user-level
programs, but not from inside the kernel.
You might want to use the value of 'jiffies' which is incremented every 10
ms on x86, if you can live with this resolution.

Sincerely,

Bogdan Costescu

IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu@IWR.Uni-Heidelberg.De