>
> Hi all
>
> I am working on a driver for the ACL serial cards. The manufacturer
> (StarGate, now defunct) has supplied Microsoft C code as examples on how
> the cards are programmed. I have been working through porting this code
> to run under Linux, but there are some functions I am not sure about.
> The _bios_timeofday function, below, is causing some confusion.
>
> long timeout, currtime;
> ....
> _bios_timeofday(_TIME_GETCLOCK, &timeout);
>
> I have tried replacing it with gettimeofday() but I am not sure what
> TIME_GETCLOCK does so I don't know if I am doing the right thing.
>
According to The Waite Group's __Microsoft_C_Bible..
_TIME_GETCLOCK will return the BIOS ticks which tick at about 18.206
ticks/second. It is quite likely used as a timeout in your code so
you can extrapolate the correct jiffy count to make the same time-out.
Gettimeofday() returns the system time in seconds and microseconds,
not what you want....
> Any ideas?
>
> Colin
>
> PS. This code also includes conio.h and bios.h, neither of which exists
> under Linux.
Yes, conio.h usually used in m$code for functions to poll the keyboard,
etc., not what you want in a real OS, bios.h contains function
prototypes about the m$clib interface for things like _bios_keybrd,
_bios_timeofday, etc., also not what you want.
Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.118 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/