Messages in this thread |  | | Date | Tue, 17 Jul 2001 10:46:51 -0400 (EDT) | | From | "Richard B. Johnson" <> | | Subject | Re: 2.4.6 possible problem |
| |
On Tue, 17 Jul 2001, Alex Ivchenko wrote:
> Guys, > > does anybody use interruptible_sleep_on_timeout(&wqhead, jiffies); > under 2.4.6 ? > It seems that after this call sleeping process is never rescheduled again. > Am I doing something wrong in my driver? > > > <10716> > Knowing that wait queue was reorganized in 2.4 I declared queue head as: > > static DECLARE_WAIT_QUEUE_HEAD(wqhead); > > and then in ioctl routine ^^^^^^^^^^^^^^^^^^^^^^^^^ Hmm. Don't decare it again.
funct() { size_t ticks; wait_queue_head_t wqhead; init_waitqueue_head(&wqhead);
ticks = 1 * HZ; /* For 1 second */ while((ticks = interruptible_sleep_on_timeout(&wqhead, ticks)) > 0) ; }
That'd oughtta do it. You can skip the loop if you can stand a short timeout.
Cheers, Dick Johnson
Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).
I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |