Nish Aravamudan wrote: > On Tue, 13 Jul 2004 23:07:32 +0000, Willem Riede wrote: > >> >>On 07/13/2004 01:40:54 PM, Nishanth Aravamudan wrote: > > > > >>>If someone could tell me which state (TASK_INTERRUPTIBLE or >>>TASK_UNINTERRUPTIBLE) is desired, I can fix this and perhaps replace the >>>calls with msleep(). >> >>You're right, there is a set_current_state(TASK_INTERRUPTIBLE) missing. >>I don't know why we would want to change to use msleep() though. > > > > > The main reason I see for using msleep() instead is if the task should > sleep for at least 100 ms. Using TASK_INTERRUPTIBLE (or really > anything other than msleep()) is not guaranteed to sleep as long as > requested. If that's ok / desired, then I won't convert it, of course. To be clear, the 100 ms I mention above is specific to this example. In general, if the time you want to sleep (and you really want to *sleep* for that time) is measureable in msecs, then msleep() is the way to go. -Nish