> I'm looking for someone to explain to me how schedule_time() and the
> waitqueue work together in the usb_bulk_msg() code.  Basically, I'm trying
> to URBify the usb-storage driver, and I need to understand how this all
> works together in order to do that properly.

        DECLARE_WAITQUEUE(wait,current)

        add_wait_queue(&dev->queue, wait);

        while(whatever)
        {
                do stuff;
                set_current_state(TASK_UNINTERRUPTIBLE);
                if (do if need to sleep checks)
                        schedule_timeout(2*HZ)
                set_current_state(TASK_RUNNING);
        }

        remove_wait_queue(&dev->queue, wait);


Alan
        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to