grub-devel
[Top][All Lists]
Advanced

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

Re: Timed wait/sleep


From: Haudy Kazemi
Subject: Re: Timed wait/sleep
Date: 06 Jul 2007 17:04:19 -0500

On Jul 6 2007, Alex Roman wrote:

Hello,

Is there any mechanism to wait/sleep for a specified time in GRUB?

The reason I need something like this is that, for the ATA driver I am
working on, I need to be able to wait for a memory mapped register to
change, but I don't want to wait indefinitely. I'd like to be able to
have some sort of loop that will read the register, say, 10 times,
with 10 ms pause in between the reads...

I've searched for this and wasn't able to find anything in the source code...

If there isn't one, what would be the best way to implement something
like this? Perhaps using the RTC, or straight loops? Would there be
any use, besides my driver, in developing an RTC interface?

I'd avoid straight loops...with those you run into processor speed issues...runs too fast on new CPUs, runs too slow on old hardware. Of course I guess you could calibrate some straight loops to the RTC, and then use the loops rather than polling the RTC periodically, but I don't think the extra level of complication would provide any real benefit.

Thanks!






reply via email to

[Prev in Thread] Current Thread [Next in Thread]