Hi,

I am reading a Linux device driver.  At some point it
polls a device to check if it is ready.  The timeout
is set to 5 second.  It uses the system jiffies to 
count the time:

    u32 time_out = jiffies + 5 * HZ;
    for (;;) {
        /* code to check if dev is ready */
        ........
        if (ready) break;
        if (intr_count == 0) schedule();
        if (jiffies > time_out) return ERROR;
    }

How do I implement such polling in FreeBSD?  Thanks.

--Jeff




--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to