Hi Wayne
Another alternative to generating a delay of a fixed period would be to use the 8254 or the APIC timer - Neither is a portable solution, and both liable to lcoking up the system if you are not carefull. On balance, perhaps dummy IO writes is the easiest method...
On the other hand, a software loop might avoid any IO conflicts..
extern unsigned long cpu_khz; /* clock frequency exported by the kernel */ /* grep /boot/System.map for it - It should be there for 2.4.x kernels. */ for (t=0; t<(time_delay/cpu_khz; t++) ;
Regards, Paul.
On Sunday 22 Sep 2002 9:15 pm, Wayne Stallwood wrote:
I thought that a sleep call would be the obvious solution, but I keep thinking that there is a reason Linus didn't do this, I was put off the dummy jumps as Linus infers that this causes a problem on faster machines, given that this was written at a time when a P500 was a fast machine and I am sitting on a 1Ghz Athlon I think there may be some issue with doing this.