Re: Timed wait/sleep

2007-07-22 Thread Jeroen Dekkers
At Sun, 22 Jul 2007 17:38:14 -0400, Alex Roman wrote: > > Sorry, what do you mean by busy waiting? Busy waiting is looping while checking whether a condition changed. E.g. while(condition_is_true()); It would be nicer to let the processor sleep for a while. I'm not sure whether we can actually

Re: Timed wait/sleep

2007-07-22 Thread Alex Roman
- Original message - "Alex Roman" <[EMAIL PROTECTED]> writes: Hi, Not yet... Sorry, what do you mean by busy waiting? Thanks Alex On 22/07/07, Marco Gerards <[EMAIL PROTECTED]> wrote: "Alex Roman" <[EMAIL PROTECTED]> writes: Hi, > Is there any mechanism to wait/sleep for a specified time i

Re: Timed wait/sleep

2007-07-22 Thread Marco Gerards
"Alex Roman" <[EMAIL PROTECTED]> writes: Hi, > Is there any mechanism to wait/sleep for a specified time in GRUB? Not yet. I will also need this for networking. Actually, we can do still in this idle time. I will get back on this. You can read the time in milliseconds, IIRC. You can use tha

Re: Timed wait/sleep

2007-07-07 Thread Jan C. Kleinsorge
For i/o delays on x86, Linux uses a sequence of outp(0x80). 0x80 is usually unsed. One to three times should be quite sufficient. Jan ex Roman wrote: > On 06 Jul 2007 17:04:19 -0500, Haudy Kazemi <[EMAIL PROTECTED]> wrote: >> On Jul 6 2007, Alex Roman wrote: >> I'd avoid straight loops...with tho

RE: Timed wait/sleep

2007-07-06 Thread Amin Azez
development of GRUB 2" Sent: 06/07/07 23:21 Subject: Re: Timed wait/sleep On 06 Jul 2007 17:04:19 -0500, Haudy Kazemi <[EMAIL PROTECTED]> wrote: > On Jul 6 2007, Alex Roman wrote: > I'd avoid straight loops...with those you run into processor speed > issues...runs too fast

Re: Timed wait/sleep

2007-07-06 Thread Alex Roman
On 06 Jul 2007 17:04:19 -0500, Haudy Kazemi <[EMAIL PROTECTED]> wrote: On Jul 6 2007, Alex Roman wrote: 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 t

Re: Timed wait/sleep

2007-07-06 Thread Haudy Kazemi
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.