Messages in this thread | | | From | (Alan Cox) | Subject | Re: mdelay question | Date | Fri, 26 Mar 1999 01:59:33 +0000 (GMT) |
| |
> a sigifigant time (ie, 0.25 to 1 second) if you haven't disabled > interrupts? ie, will you completely monopolize the cpu, or will the > scheduler kick you off until sometime shortly after the delay runs out?
If you want more than about 1/100th of a second use a loop yielding CPU time. Better yet sleep and wakeup if your card can IRQ the event
At minimum
unsigned long time=jiffies+(msec*HZ)/1000;
while(time_before(time, jiffies)) schedule();
or in an irq/bh set a timer to go off
Alan
- 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/
| |